From 7e738f69cf7b353492edefa1768005f19ea7e7ee Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 28 八月 2024 10:25:11 +0800
Subject: [PATCH] update上线更新

---
 sub_pages/customer/shopping/confirm.vue |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/sub_pages/customer/shopping/confirm.vue b/sub_pages/customer/shopping/confirm.vue
index 01c4631..4ea2671 100644
--- a/sub_pages/customer/shopping/confirm.vue
+++ b/sub_pages/customer/shopping/confirm.vue
@@ -2,6 +2,7 @@
 	import {
 		mapState
 	} from 'vuex'
+	import environments from '@/environments'
 
 	export default {
 		name: "订单详情",
@@ -48,16 +49,26 @@
 			// @ApiModelProperty(value = "打包费")
 			//   private BigDecimal packing;
 
+			// 两种情况,我合伙人是A,我进入页面前改成了B,我进去后还是获取了A——可以通过
+
 			if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.partnerId) {
-				this.$http.request('get', '/api/partner/page/view', {
+				// 考虑一下,由后台实时获取,如果获取的合伙人id不一样,那么就刷新当前用户信息。
+
+				this.$http.request('get', '/api/current/customer/partner', {
 					params: {
-						id: this.currentInfo.customerDTO.partnerId
+						// id: this.currentInfo.customerDTO.partnerId
 					}
-				}).then(res => {
+				}).then(async res => {
 					if (res.code == 0) {
 						this.partnerInfo = res.data || {}
+						if (this.partnerInfo.id !== this.currentInfo.customerDTO.partnerId) {
+							//刷新用户信息
+							await this.$store.dispatch('getCurrentInfo')
+						}
 					}
 				})
+
+
 			}
 
 		},
@@ -166,16 +177,25 @@
 							if (code === 0) {
 								//提交信息
 								console.log('pay,', data)
-								if (data && data['_testOrderId']) {
+								// /api/pub/init/callback?orderId=
+								// if(env.pro)
+								if (false && data && (data['_testV2OrderId'] || data['_testOrderId']) &&
+									environments.httpBaseUri.startsWith(
+										'http://47.99.58.211/flower')) {
 									//回调
 									tmp.$message.showLoading()
 									const res2 = await tmp.$http.request('get',
-										'/api/customer/flower/order/callback/tmp', {
+										'/api/pub/init/callback', {
 											params: {
-												id: res2.data['_testOrderId']
+												orderId: data['_testV2OrderId'] || data[
+													'_testOrderId'] || ''
 											}
 										})
 									tmp.$message.hideLoading()
+									tmp.$message.showToast('支付成功')
+									//返回上一页
+									await tmp.$store.dispatch('sign_add', 'shopping')
+									uni.navigateBack()
 								} else if (data) {
 									wx.requestPayment({
 										...data,

--
Gitblit v1.9.3