From 7e738f69cf7b353492edefa1768005f19ea7e7ee Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期三, 28 八月 2024 10:25:11 +0800 Subject: [PATCH] update上线更新 --- pages/order/order.vue | 84 +++++++++++++++++++++++++++++++++-------- 1 files changed, 67 insertions(+), 17 deletions(-) diff --git a/pages/order/order.vue b/pages/order/order.vue index ee974fb..92e1171 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -61,10 +61,10 @@ item.statusBackend = '已取消' item.status = 'CANCEL' item.statusStr = '已取消' - + item.bctime = '' change = true - + } else { //相差 var alltime = parseInt(diff / 1000) @@ -100,9 +100,9 @@ url: '/pages/order/order-detail?id=' + item.id }) }, - toDetailSale(item) { + toDetailSale(dto, flower) { uni.navigateTo({ - url: '/pages/order/order-detail?showsales=1&id=' + item.id + url: '/pages/order/order-detail?showsales=1&id=' + dto.id + '&flowerId=' + flower.id }) }, async buttonClick(item, buttontype) { @@ -127,18 +127,61 @@ break case 'confirm': { await this.$message.confirm('是否确定收货') - // 发送请求 - this.$message.showLoading() - const { - code - } = await this.$http.request('get', '/api/customer/order/receive/confirm', { - params: { - id: item.id, + var tryCallWx = false + // #ifdef MP + let tmp = this + if (wx.openBusinessView&&item.paymentTrId) { + tryCallWx = true + wx.openBusinessView({ + businessType: 'weappOrderConfirm', + extraData: { + // merchant_id: '1230000109', + // merchant_trade_no: '1234323JKHDFE1243252', + transaction_id: item.paymentTrId + }, + async success() { + //dosomething + // 发送请求 + tmp.$message.showLoading() + const { + code + } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', { + params: { + id: item.id, + } + }) + tmp.$message.hideLoading() + if (code === 0) { + tmp.refreshList() + } + }, + fail(e) { + //dosomething + console.log('error fail', e) + tmp.$message.showToast('收货失败') + }, + complete() { + //dosomething + } + }); + } + + // #endif + + if (!tryCallWx) { + // 发送请求 + this.$message.showLoading() + const { + code + } = await this.$http.request('get', '/api/customer/order/receive/confirm', { + params: { + id: item.id, + } + }) + this.$message.hideLoading() + if (code === 0) { + this.refreshList() } - }) - this.$message.hideLoading() - if (code === 0) { - this.refreshList() } } @@ -372,6 +415,13 @@ </view> </view> </view> + <view class="line-gray"></view> + <view class="flex buttons"> + <view class="button button-1 m-l-a m-r-15" @click="toDetailSale(dto,item)" + v-if="dto.statusBackend === 'RECEIVE'"> 申请售后 + </view> + </view> + </view> <view class="line-gray"></view> @@ -392,9 +442,9 @@ v-if="dto.statusBackend ==='RECEIVE'"> 确认收货 </view> <!-- ||item.statusBackend=='COMPLETED' --> - <view class="button button-1 m-l-a m-r-15" @click="toDetailSale(dto)" + <!-- <view class="button button-1 m-l-a m-r-15" @click="toDetailSale(dto)" v-if="dto.statusBackend === 'RECEIVE'"> 申请售后 - </view> + </view> --> <view class="button button-0 m-l-a m-r-15" @click="buttonClick(dto,'evaluate')" v-if="dto.statusBackend === 'EVALUATE'"> 评价 </view> -- Gitblit v1.9.3