index.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. const _Http = getApp().globalData.http;
  2. Page({
  3. data: {
  4. contactsid: 0,
  5. tabsActive: 0, //tabs 选中项
  6. tabsList: [{
  7. label: "详细信息",
  8. num: 132
  9. }, {
  10. label: "跟进动态",
  11. num: 132
  12. }, {
  13. label: "地址",
  14. num: 132
  15. }],
  16. },
  17. onLoad(options) {
  18. if (options.contactsid) {
  19. this.setData({
  20. contactsid: options.contactsid
  21. });
  22. this.getDetail();
  23. }
  24. },
  25. /* 获取详情信息 */
  26. getDetail() {
  27. _Http.basic({
  28. "id": 20221026110602,
  29. "content": {
  30. "contactsid": this.data.contactsid
  31. }
  32. }).then(res => {
  33. console.log("联系人详情", res)
  34. const item = res.data;
  35. this.setData({
  36. detail: item,
  37. briefs: [{
  38. label: "手机号码",
  39. value: item.phonenumber
  40. }, {
  41. label: "性别",
  42. value: item.sex
  43. }, {
  44. label: "生日",
  45. value: item.birthday
  46. }, {
  47. label: "最近跟进时间",
  48. value: ""
  49. }],
  50. list1: [{
  51. label: "手机号码",
  52. value: item.phonenumber
  53. }, {
  54. label: "性别",
  55. value: item.sex
  56. }, {
  57. label: "生日",
  58. value: item.birthday
  59. }, {
  60. label: "邮箱",
  61. value: item.email
  62. }, {
  63. label: "部门",
  64. value: item.depname
  65. }, {
  66. label: "职位",
  67. value: item.position
  68. }, {
  69. label: "备注",
  70. value: item.remarks
  71. }]
  72. });
  73. })
  74. },
  75. onShareAppMessage() {}
  76. })