integralOrderDetails.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_integral = require("../api/integral.js");
  4. require("../common/request.js");
  5. const _sfc_main = {
  6. data() {
  7. return {
  8. orderId: null,
  9. order: null,
  10. item: null
  11. };
  12. },
  13. onLoad(option) {
  14. this.orderId = option.orderId;
  15. },
  16. onShow() {
  17. this.getIntegralOrderById();
  18. },
  19. methods: {
  20. getIntegralOrderById() {
  21. var data = { orderId: this.orderId };
  22. api_integral.getIntegralOrderById(data).then((res) => {
  23. if (res.code == 200) {
  24. this.order = res.data;
  25. this.item = JSON.parse(this.order.itemJson);
  26. } else {
  27. common_vendor.index.showToast({
  28. icon: "none",
  29. title: "\u8BF7\u6C42\u5931\u8D25"
  30. });
  31. }
  32. });
  33. },
  34. copyOrderSn(text) {
  35. common_vendor.index.setClipboardData({
  36. data: text,
  37. success: () => {
  38. common_vendor.index.showToast({
  39. title: "\u5185\u5BB9\u5DF2\u6210\u529F\u590D\u5236\u5230\u526A\u5207\u677F",
  40. icon: "none"
  41. });
  42. }
  43. });
  44. }
  45. }
  46. };
  47. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  48. return common_vendor.e({
  49. a: $data.order.status == 1
  50. }, $data.order.status == 1 ? {} : {}, {
  51. b: $data.order.status == 2
  52. }, $data.order.status == 2 ? {} : {}, {
  53. c: $data.order.status == 3
  54. }, $data.order.status == 3 ? {} : {}, {
  55. d: $data.order.status == -1
  56. }, $data.order.status == -1 ? {} : {}, {
  57. e: $data.order.userName != null
  58. }, $data.order.userName != null ? common_vendor.e({
  59. f: common_vendor.t($data.order.userName),
  60. g: $data.order.userPhone != null
  61. }, $data.order.userPhone != null ? {
  62. h: common_vendor.t($data.order.userPhone)
  63. } : {}, {
  64. i: common_vendor.t($data.order.userAddress)
  65. }) : {}, {
  66. j: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl,
  67. k: common_vendor.t($data.item.goodsName),
  68. l: common_vendor.t($data.item.integral),
  69. m: common_vendor.t($data.order.orderCode),
  70. n: common_vendor.o(($event) => $options.copyOrderSn($data.order.orderCode)),
  71. o: common_vendor.t($data.order.createTime),
  72. p: common_vendor.t($data.order.integral),
  73. q: $data.order.deliveryName != null
  74. }, $data.order.deliveryName != null ? {
  75. r: common_vendor.t($data.order.deliveryName)
  76. } : {}, {
  77. s: $data.order.deliverySn != null
  78. }, $data.order.deliverySn != null ? {
  79. t: common_vendor.t($data.order.deliverySn)
  80. } : {});
  81. }
  82. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/integralOrderDetails.vue"]]);
  83. wx.createPage(MiniProgramPage);