index.js 1.1 KB

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