index.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. function e(e, r, t) {
  2. return r in e ? Object.defineProperty(e, r, {
  3. value: t,
  4. enumerable: !0,
  5. configurable: !0,
  6. writable: !0
  7. }) : e[r] = t, e;
  8. }
  9. var app = getApp();
  10. Component({
  11. properties: {
  12. orderStatus: {
  13. type: Number
  14. },
  15. orderSkuStatus: {
  16. type: Number
  17. },
  18. isCanRefund: {
  19. type: Number
  20. },
  21. canEvaluate: {
  22. type: Number
  23. },
  24. orderNo: {
  25. type: String
  26. },
  27. orderId: {
  28. type: String
  29. },
  30. orderSkuId: {
  31. type: String
  32. },
  33. skuSpec: {
  34. type: String
  35. },
  36. skuImage: {
  37. type: String
  38. },
  39. skuName: {
  40. type: String
  41. },
  42. salePrice: {
  43. type: String
  44. },
  45. spuId: {
  46. type: String
  47. },
  48. skuNum: {
  49. type: Number
  50. },
  51. skuId: {
  52. type: String
  53. }
  54. },
  55. data: {
  56. userInfo: {},
  57. confirmGoodsVisible: false
  58. },
  59. onLoad: function () {
  60. this.setData({
  61. userInfo: app.globalData.userInfo
  62. });
  63. },
  64. methods: {
  65. callDialog: function (r) {
  66. var t = r.target.dataset,
  67. o = t.show,
  68. n = t.cancel;
  69. this.setData(e({}, "" + (o || n), !!o));
  70. },
  71. /**
  72. * 申请售后
  73. */
  74. applyForService: function () {
  75. var e = this.data,
  76. t = e.orderNo, o = e.orderId, n = e.orderSkuId, u = e.skuSpec, a = e.skuImage, d = e.skuName, s = e.salePrice, i = (e.skuNum,
  77. {
  78. orderNo: t,
  79. orderId: o,
  80. orderSkuId: n,
  81. skuDesc: u,
  82. skuImage: a,
  83. skuName: d,
  84. salePrice: s
  85. });
  86. wx.showLoading({
  87. title: "加载中..."
  88. });
  89. // (0, r.default)("/shop-order/myorder/refund/check", {
  90. // orderSkuId: n
  91. // }).then(function (e) {
  92. // wx.hideLoading(), wx.navigateTo({
  93. // url: "/pages/refund/refundApply?canRefundGoods=" + e.body.canRefundGoods + "&dataInfo=" + JSON.stringify(i)
  94. // });
  95. // });
  96. },
  97. goComment: function () {
  98. var e = this.data, r = e.spuId, t = e.skuImage, o = e.skuName, n = {
  99. spuId: r,
  100. orderId: e.orderId,
  101. orderSkuId: e.orderSkuId,
  102. skuSpec: e.skuSpec,
  103. goodsImg: t,
  104. goodsName: o
  105. };
  106. wx.navigateTo({
  107. url: "/pages/order/evaluate?param=" + JSON.stringify(n)
  108. });
  109. },
  110. /**
  111. * 确认提货
  112. */
  113. confirmGoods: function () {
  114. var e = this;
  115. wx.showLoading({
  116. title: "加载中..."
  117. });
  118. // (0, r.default)("/shop-order/order/sign", {
  119. // orderNo: this.data.orderNo,
  120. // orderSkuId: this.data.orderSkuId
  121. // }).then(function (r) {
  122. // wx.showToast({
  123. // title: "已提货成功",
  124. // icon: "none",
  125. // success: function () {
  126. // setTimeout(function () {
  127. // e.triggerEvent("goodsConfirmed");
  128. // }, 1500);
  129. // }
  130. // });
  131. // }).catch(function (e) {
  132. // console.log(e);
  133. // });
  134. this.setData({
  135. confirmGoodsVisible: false
  136. });
  137. }
  138. }
  139. });