|
@@ -46,15 +46,15 @@ Page({
|
|
|
selectedAfterSaleType: "",
|
|
selectedAfterSaleType: "",
|
|
|
selectedRefundReason: "",
|
|
selectedRefundReason: "",
|
|
|
refundStatus: "received", // received | not-received
|
|
refundStatus: "received", // received | not-received
|
|
|
- refundMaxAmount: 240,
|
|
|
|
|
- refundAmount: 240,
|
|
|
|
|
|
|
+ refundMaxAmount: 0,
|
|
|
|
|
+ refundAmount: 0,
|
|
|
refundDesc: "",
|
|
refundDesc: "",
|
|
|
refundProofImages: [] as string[],
|
|
refundProofImages: [] as string[],
|
|
|
afterSaleSiteOption: {
|
|
afterSaleSiteOption: {
|
|
|
- name: "肝血虚穴位站点",
|
|
|
|
|
- price: 80,
|
|
|
|
|
- meta1: "10贴",
|
|
|
|
|
- meta2: "x3",
|
|
|
|
|
|
|
+ name: "",
|
|
|
|
|
+ price: 0,
|
|
|
|
|
+ meta1: "",
|
|
|
|
|
+ meta2: "",
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
onLoad(options: any) {
|
|
onLoad(options: any) {
|
|
@@ -175,9 +175,8 @@ Page({
|
|
|
statusText: this.getGoodsStatusText(item?.sellType, item?.progress, item?.receiptStatus),
|
|
statusText: this.getGoodsStatusText(item?.sellType, item?.progress, item?.receiptStatus),
|
|
|
isCanEvaluate: item?.isCanEvaluate, //是否可以评价 false-否 true-是
|
|
isCanEvaluate: item?.isCanEvaluate, //是否可以评价 false-否 true-是
|
|
|
evaluateTime: item?.evaluateTime, //有评价时间就是已评价,是空就是未评价
|
|
evaluateTime: item?.evaluateTime, //有评价时间就是已评价,是空就是未评价
|
|
|
- // [测试数据] 为了演示“申请售后”和“退款申请中”的不同状态
|
|
|
|
|
- // 如果是第一个商品或者偶数商品,模拟状态为1(退款申请中),否则为0(可申请售后)
|
|
|
|
|
- afterSaleStatus: index === 0 ? 1 : 0,
|
|
|
|
|
|
|
+ // [测试数据] 实体商品模拟”退款申请中”,线下服务和线上权益模拟”申请售后”
|
|
|
|
|
+ afterSaleStatus: item?.sellType === '1' ? 1 : 0,
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
@@ -287,14 +286,26 @@ Page({
|
|
|
// 仅用于 catchtap 阻止冒泡,避免触发父级 goAppointment
|
|
// 仅用于 catchtap 阻止冒泡,避免触发父级 goAppointment
|
|
|
},
|
|
},
|
|
|
onApplyAfterSale(e: any) {
|
|
onApplyAfterSale(e: any) {
|
|
|
- const status = e.currentTarget.dataset.status;
|
|
|
|
|
|
|
+ const { status, goods } = e.currentTarget.dataset;
|
|
|
if (status === 1) {
|
|
if (status === 1) {
|
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
|
url: "/module/order/pages/refund-processing/refund-processing"
|
|
url: "/module/order/pages/refund-processing/refund-processing"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.setData({ afterSalePopupVisible: true });
|
|
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ afterSaleSiteOption: {
|
|
|
|
|
+ image: goods.image || '',
|
|
|
|
|
+ name: goods.name,
|
|
|
|
|
+ price: goods.price,
|
|
|
|
|
+ meta1: goods.description || '',
|
|
|
|
|
+ meta2: `x${goods.quantity}`,
|
|
|
|
|
+ },
|
|
|
|
|
+ refundMaxAmount: goods.price || 0,
|
|
|
|
|
+ refundAmount: goods.price || 0,
|
|
|
|
|
+ afterSalePopupVisible: true,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
onAfterSalePopupClose() {
|
|
onAfterSalePopupClose() {
|