index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. disabled: {
  5. type: Boolean
  6. }
  7. },
  8. data: {
  9. "sa_contractid": 1,
  10. "content": {
  11. "nocache": true,
  12. "sa_contractid": 1,
  13. pageNumbe: 1,
  14. pageTotal: 1,
  15. total: null,
  16. "where": {
  17. "conditino": ""
  18. }
  19. }
  20. },
  21. lifetimes: {
  22. attached: function () {
  23. getApp().globalData.Language.getLanguagePackage(this)
  24. }
  25. },
  26. methods: {
  27. /* 获取地址列表 */
  28. getList(id, init) {
  29. let content = this.data.content;
  30. content.sa_contractid = id;
  31. if (init) content.pageNumber = 1
  32. _Http.basic({
  33. "id": "20240923153204",
  34. content
  35. }).then(res => {
  36. console.log("关联联系人列表", res)
  37. if (res.code != '1') return wx.showToast({
  38. title: res.data,
  39. icon: "none"
  40. })
  41. this.setData({
  42. list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
  43. "content.pageNumber": res.pageNumber + 1,
  44. "content.pageSize": res.pageSize,
  45. "content.pageTotal": res.pageTotal,
  46. "content.sa_contractid": id,
  47. "content.total": res.total,
  48. sa_contractid: id,
  49. })
  50. })
  51. },
  52. /* 修改总数 */
  53. changeTotal() {
  54. this.setData({
  55. "content.total": this.data.content.total - 1
  56. })
  57. }
  58. }
  59. })