index.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. },
  5. data: {
  6. content: {
  7. total: null
  8. }
  9. },
  10. methods: {
  11. getList(id) {
  12. _Http.basic({
  13. "id": 20221012164302,
  14. "content": {
  15. sa_customersid: id
  16. },
  17. }).then(res => {
  18. console.log("报价单关联客户", res)
  19. if (res.msg != '成功') return wx.showToast({
  20. title: res.msg,
  21. icon: "none"
  22. });
  23. this.setData({
  24. list: [res.data],
  25. "content.total": 1
  26. })
  27. this.getTags();
  28. })
  29. },
  30. /* 获取列表标签 */
  31. getTags() {
  32. let item = this.data.list[0];
  33. _Http.basic({
  34. "id": 20220929085401,
  35. "content": {
  36. nocache: true,
  37. "ownertable": "sa_customers",
  38. ownerid: item.sa_customersid
  39. }
  40. }).then(res => {
  41. console.log("标签", res)
  42. if (res.msg != '成功') return wx.showToast({
  43. title: res.msg,
  44. icon: "none"
  45. });
  46. item.tags = res.data
  47. this.setData({
  48. "list[0]": item
  49. })
  50. })
  51. },
  52. }
  53. })