From 5f8604ee15ebe9ed41abcdbf48b41b9cd481ede5 Mon Sep 17 00:00:00 2001 From: From-wh Date: Wed, 17 May 2023 10:47:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=8F=E7=A8=8B=E5=BA=8Fapi=E6=94=B6?= =?UTF-8?q?=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/goods/order_details/index.vue | 48 +++++++++++++++---- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/template/uni-app/pages/goods/order_details/index.vue b/template/uni-app/pages/goods/order_details/index.vue index 7a770cd53..344ee30d2 100644 --- a/template/uni-app/pages/goods/order_details/index.vue +++ b/template/uni-app/pages/goods/order_details/index.vue @@ -359,8 +359,8 @@ hover-class='none' :url="'/pages/goods/goods_logistics/index?orderId='+ orderInfo.order_id"> {{$t(`查看物流`)}} - + {{$t(`查看拼团`)}} @@ -585,10 +585,11 @@ this.getOrderInfo(); this.getUserInfo(); this.getCustomerType(); - let options = wx.getEnterOptionsSync(); - if (options.scene == '1038' && options.referrerInfo.appId == 'wxef277996acc166c3') { + let opt = wx.getEnterOptionsSync(); + console.log(opt) + if (opt.scene == '1038' && opt.referrerInfo.appId == 'wxef277996acc166c3') { // 代表从收银台小程序返回 - let extraData = options.referrerInfo.extraData; + let extraData = opt.referrerInfo.extraData; if (!extraData) { // "当前通过物理按键返回,未接收到返参,建议自行查询交易结果"; this.getOrderInfo(); @@ -1034,12 +1035,41 @@ }) }, confirmOrder(orderId) { + let that = this; + // #ifdef MP + if (wx.openBusinessView && this.orderInfo.order_shipping_open && this.orderInfo + .trade_no) { + wx.openBusinessView({ + businessType: 'weappOrderConfirm', + extraData: { + transaction_id: this.orderInfo.trade_no + }, + success() {}, + fail(err) { + return that.$util.Tips({ + title: err.errMsg + }); + }, + complete() { + //dosomething + } + }); + } else { + this.defaultTake(orderId) + } + // #endif + // #ifndef MP + this.defaultTake(orderId) + // #endif + }, + defaultTake(orderId) { let that = this; uni.showModal({ title: that.$t(`确认收货`), content: that.$t(`为保障权益,请收到货确认无误后,再确认收货`), - success: function(res) { + success: (res) => { if (res.confirm) { + console.log('1') orderTake(orderId ? orderId : that.order_id).then(res => { return that.$util.Tips({ title: that.$t(`操作成功`), @@ -1489,12 +1519,12 @@ -webkit-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75); -moz-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75); box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75); - bottom: 110rpx; - /* #ifdef APP-PLUS */ + bottom: 110rpx; + /* #ifdef APP-PLUS */ bottom: calc(110rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/ bottom: calc(110rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/ - /* #endif */ + /* #endif */ .more-btn { color: #333; padding: 4rpx;