|
|
@@ -106,16 +106,27 @@ Page({
|
|
|
// 点击确定取消订单按钮
|
|
|
const that = this;
|
|
|
/* 取消订单逻辑 */
|
|
|
+ wx.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "确认取消该订单吗?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.cancelOrdering();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消订单
|
|
|
+ async cancelOrdering() {
|
|
|
try {
|
|
|
- console.log("cancelOrder", that.data.id);
|
|
|
- await orderCancelMethod(that.data.id);
|
|
|
+ await orderCancelMethod(this.data.id);
|
|
|
/* 取消订单逻辑 */
|
|
|
- that.setData({ showConfirm: false });
|
|
|
+ this.setData({ showConfirm: false });
|
|
|
wx.navigateTo({
|
|
|
url: "/module/article/pages/success-page/success-page?title=订单取消成功",
|
|
|
});
|
|
|
} catch (error: any) {
|
|
|
- getTickleContext.call(that).showWarnMessage(error.errMsg);
|
|
|
+ getTickleContext.call(this).showWarnMessage(error.errMsg);
|
|
|
}
|
|
|
},
|
|
|
// 取消订单
|
|
|
@@ -134,6 +145,22 @@ Page({
|
|
|
},
|
|
|
// 确认收货
|
|
|
async confirmReceipt() {
|
|
|
+ const orderId = this.data.id;
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/module/article/pages/confirm-receiving/confirm-receiving?orderId=${orderId}`,
|
|
|
+ });
|
|
|
+ // let that = this;
|
|
|
+ // wx.showModal({
|
|
|
+ // title: "提示",
|
|
|
+ // content: "确认收货后,订单将无法修改,请确认无误后再进行操作",
|
|
|
+ // success: (res) => {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // that.confirmReceiving();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ async confirmReceiving() {
|
|
|
try {
|
|
|
await orderConfirmMethod(this.data.id);
|
|
|
wx.navigateTo({
|