index.js 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. data: {
  4. steps: [],
  5. sa_logisticsid: 0,
  6. content: {
  7. nocache: true,
  8. pageNumber: 1,
  9. pageTotal: 1,
  10. total: null
  11. }
  12. },
  13. methods: {
  14. copyNum(e) {
  15. if (this.data.un) wx.setClipboardData({
  16. data: this.data.un,
  17. success: function (res) {
  18. wx.showToast({
  19. title: '快递单号复制成功',
  20. icon: "none"
  21. })
  22. }
  23. })
  24. },
  25. getList(id) {
  26. let content = this.data.content;
  27. content.billno = id;
  28. _Http.basic({
  29. "id": "2024101114155503",
  30. content
  31. }).then(res => {
  32. console.log("物流查询", res)
  33. if (res.msg != '成功') return wx.showToast({
  34. title: res.msg,
  35. icon: "none"
  36. })
  37. let data = res.data.data[0];
  38. this.setData({
  39. steps: data.traceList.map(v => {
  40. return {
  41. text: v.acceptTime,
  42. desc: v.remark
  43. }
  44. }),
  45. nu: data.orderNo,
  46. "content.total": 1
  47. })
  48. })
  49. }
  50. }
  51. })