index.js 1.2 KB

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