storeOrderDelivery.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. "use strict";
  2. const common_vendor = require("../common/vendor.js");
  3. const common_assets = require("../common/assets.js");
  4. const _sfc_main = {
  5. data() {
  6. return {
  7. statusBarHeight: common_vendor.index.getStorageSync("menuInfo").statusBarHeight,
  8. orderId: null,
  9. deliveryId: null,
  10. express: {},
  11. expressList: []
  12. };
  13. },
  14. onLoad(option) {
  15. this.orderId = option.orderId;
  16. this.getExpress();
  17. },
  18. methods: {
  19. getExpress() {
  20. var data = { orderId: this.orderId };
  21. getExpress(data).then((res) => {
  22. if (res.code == 200) {
  23. this.express = res.express;
  24. this.expressList = res.data;
  25. this.deliveryId = res.deliveryId;
  26. } else {
  27. common_vendor.index.showToast({
  28. icon: "none",
  29. title: "请求失败"
  30. });
  31. }
  32. });
  33. },
  34. // 返回上一页
  35. back() {
  36. common_vendor.index.navigateBack();
  37. },
  38. // 复制运单号
  39. copyOrderSn(text) {
  40. common_vendor.index.setClipboardData({
  41. data: text,
  42. success: () => {
  43. common_vendor.index.showToast({
  44. title: "内容已成功复制到剪切板",
  45. icon: "none"
  46. });
  47. }
  48. });
  49. },
  50. // 拨打电话
  51. callPhone(phone) {
  52. common_vendor.index.makePhoneCall({
  53. phoneNumber: phone
  54. });
  55. }
  56. }
  57. };
  58. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  59. return common_vendor.e({
  60. a: common_assets._imports_0$14,
  61. b: $data.statusBarHeight,
  62. c: common_assets._imports_1$9,
  63. d: common_vendor.o((...args) => $options.back && $options.back(...args)),
  64. e: common_vendor.t($data.deliveryId),
  65. f: common_vendor.o(($event) => $options.copyOrderSn($data.deliveryId)),
  66. g: common_vendor.t($data.express.name),
  67. h: $data.expressList != null
  68. }, $data.expressList != null ? common_vendor.e({
  69. i: $data.expressList.Traces != null
  70. }, $data.expressList.Traces != null ? {
  71. j: common_vendor.f($data.expressList.Traces, (item, index, i0) => {
  72. return {
  73. a: common_vendor.t(item.AcceptStation),
  74. b: common_vendor.t(item.AcceptTime),
  75. c: index
  76. };
  77. }),
  78. k: common_assets._imports_2$6,
  79. l: common_assets._imports_3$3
  80. } : {}) : {});
  81. }
  82. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  83. wx.createPage(MiniProgramPage);