Kaynağa Gözat

bugfix:修复PMS预订单没有设置订单平台的问题

Shu 3 hafta önce
ebeveyn
işleme
5844e878ae
1 değiştirilmiş dosya ile 10 ekleme ve 9 silme
  1. 10 9
      subpkg_checkin/confirmOrder/confirmOrder.vue

+ 10 - 9
subpkg_checkin/confirmOrder/confirmOrder.vue

@@ -180,14 +180,6 @@
 				//小程序创建的订单,先在后台创建订单,创建成功后跳转至支付页面
 				if (this.order.orderSource === 'MINI_APP') {
 					if (!this.order.orderId) {
-						// #ifdef MP-WEIXIN
-						this.order["platform"] = "WECHAT"
-						// #endif
-
-						// #ifdef MP-ALIPAY
-						this.order["platform"] = "ALIPAY"
-						// #endif
-						
 						let createOrderRes = await uni.$http.post('/order', this.order)
 						if (createOrderRes.data.code !== 200) {
 							uni.$showMsg('订单创建失败,请重试')
@@ -273,6 +265,14 @@
 			async ystPayment() {
 				const {miniProgram: {appId}} = uni.getAccountInfoSync();
 				// console.log("小程序信息", appId);
+				
+				// #ifdef MP-WEIXIN
+				const platform = "WECHAT"
+				// #endif
+
+				// #ifdef MP-ALIPAY
+				const platform = "ALIPAY"
+				// #endif
 
 				const {data: submitRes} = await uni.$http.post('/order/payment/ystPay', {
 					openid: this.userInfo.openid,
@@ -329,7 +329,8 @@
 				const {data: paymentRes} = await uni.$http.post('/order/payment/queryYstPay', {
 					openid: this.userInfo.openid,
 					orderId: this.order.orderId,
-					appId: appId
+					appId: appId,
+					platform: platform
 				})
 				console.log("订单支付结果", paymentRes)