diff --git a/components/themes/diy.vue b/components/themes/diy.vue index 9631cd6..2cd969b 100644 --- a/components/themes/diy.vue +++ b/components/themes/diy.vue @@ -298,7 +298,7 @@ - @@ -333,7 +333,7 @@ - + @@ -168,7 +168,7 @@ OrderInfo.kind_id == 1201 && OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED " - @click="confirmReceipt" + @click="confirmReceipt(OrderInfo, $event)" >{{ __("确认收货") }} { + console.log("e1", e); + if (e.extraData.status === "success") { + // 用户确认收货成功,再执行自己的代码 + that.$.request({ + url: that.Config.URL.user.order_receive, + data: params, + success: function (data, status, msg, code) { + if (status == 200) { + that.$.alert(that.__("收货成功!"), function () { + that.notice.postNotificationName("RefreshMessage", e); + }); + } + }, + }); + } else if (e.extraData.status === "fail") { + // 用户确认收货失败 + uni.showToast({ + title: "确认收货失败", + icon: "none", + }); + } else if (e.extraData.status === "cancel") { + // 用户取消 + uni.showToast({ + title: "取消确认收货", + icon: "none", + }); + } + }, + fail: (e) => { + console.log("e2", e); + uni.showToast({ + title: "确认收货失败", + icon: "none", }); - } - }, - true - ); + }, + complete: (e) => { + console.log("e3", e); + console.log("无论是否成功都会执行"); + }, + }); + } else { + //引导用户升级微信版本 + uni.showToast({ + title: "请升级微信版本", + icon: "none", + }); + that.$.confirm( + that.__("是否确认收货?"), + function (e) { + if (e.confirm) { + that.$.request({ + url: that.Config.URL.user.order_receive, + data: params, + success: function (data, status, msg, code) { + if (status == 200) { + that.$.alert(that.__("收货成功!"), function () { + that.notice.postNotificationName("RefreshMessage", e); + }); + } + }, + }); + } + }, + true + ); + } + + var that = this; + + // that.$.confirm( + // that.__("是否确认收货?"), + // function (e) { + // if (e.confirm) { + // that.$.request({ + // url: that.Config.URL.user.order_receive, + // data: params, + // success: function (data, status, msg, code) { + // if (status == 200) { + // that.$.alert(that.__("收货成功!"), function () { + // that.notice.postNotificationName("RefreshMessage", e); + // }); + // } + // }, + // }); + // } + // }, + // true + // ); }, gotopay: async function (e) { var that = this; @@ -2176,7 +2255,6 @@ export default { }; - \ No newline at end of file + diff --git a/member/order/list.vue b/member/order/list.vue index e2e3853..e59ff98 100644 --- a/member/order/list.vue +++ b/member/order/list.vue @@ -354,7 +354,7 @@ items.order_state_id == StateCode.ORDER_STATE_SHIPPED " class="u-link-btn" - @click="confirmReceipt" + @click="confirmReceipt(items, $event)" >{{ __("确认收货") }} - - \ No newline at end of file + diff --git a/pagesub/index/store.vue b/pagesub/index/store.vue index 47254d2..86fdfd9 100644 --- a/pagesub/index/store.vue +++ b/pagesub/index/store.vue @@ -1863,9 +1863,9 @@ export default { .back-to-top { position: fixed; - top: 75%; + top: 80%; transform: translateY(-75%); - right: 20rpx; + right: 14rpx; width: 80rpx; height: 80rpx; text-align: center;