index.js 935 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. data: {
  4. sa_logisticsid: 0,
  5. content: {
  6. nocache: true,
  7. pageNumber: 1,
  8. pageTotal: 1,
  9. total: null
  10. }
  11. },
  12. methods: {
  13. getList(id, init) {
  14. let content = this.data.content;
  15. content.sa_logisticsid = id;
  16. if (init) content.pageNumber = 1;
  17. _Http.basic({
  18. "id": "20230111144504",
  19. content
  20. }).then(res => {
  21. console.log("装箱列表", res)
  22. if (res.msg != '成功') return wx.showToast({
  23. title: res.msg,
  24. icon: "none"
  25. })
  26. this.setData({
  27. list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
  28. "content.pageNumber": res.pageNumber + 1,
  29. "content.pageSize": res.pageSize,
  30. "content.pageTotal": res.pageTotal,
  31. "content.total": res.total,
  32. sa_logisticsid: id
  33. })
  34. })
  35. }
  36. }
  37. })