Browse Source

2023-12-9

cmy 1 year ago
parent
commit
34996b0ceb
2 changed files with 32 additions and 5 deletions
  1. 2 2
      manifest.json
  2. 30 3
      pages/goods/cashier/index.vue

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "御康堂",
     "appid" : "__UNI__A07DF11",
     "description" : "御康堂",
-    "versionName" : "5.2.0",
-    "versionCode" : 520,
+    "versionName" : "5.2.2",
+    "versionCode" : 522,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 30 - 3
pages/goods/cashier/index.vue

@@ -69,7 +69,7 @@
 					{
 						"name": this.$t(`支付宝支付`),
 						"icon": "icon-zhifubao",
-						value: 'alipay',
+						value: 'agree',
 						title: this.$t(`使用支付宝支付`),
 						payStatus: 1,
 					},
@@ -285,7 +285,7 @@
 						complete: () => {}
 					});
 				}
-				orderPay({
+				let updata = {
 					uni: that.orderId,
 					paytype: paytype,
 					type: that.friendPay ? 1 : 0,
@@ -299,7 +299,17 @@
 					// #ifdef APP-PLUS
 					quitUrl: '/pages/goods/order_details/index?order_id=' + this.orderId
 					// #endif
-				}).then(res => {
+				}
+				
+				if (paytype == 'agree') {
+					updata.paytype = 'huijupay';
+					updata.join_pay = 'uni';
+				}
+				if (paytype == 'huijupay') {
+					updata.paytype = 'huijupay';
+					updata.join_pay = 'agree';
+				}
+				orderPay(updata).then(res => {
 					let status = res.data.status,
 						orderId = res.data.result.order_id,
 						jsConfig = res.data.result.jsConfig,
@@ -320,6 +330,23 @@
 						}, 3000)
 						return
 					}
+					if (paytype == 'agree' && that.orderId) {
+						console.log(res);
+						setTimeout(() => {
+							uni.hideLoading();
+							let  urlarr = (res.data.result.jsConfig.rc_Result.split(`location.href='`))[1].split("'");
+							// #ifdef H5
+							window.open(urlarr[0]);
+							// #endif
+							// #ifdef APP
+							plus.runtime.openWeb(urlarr[0]);
+							// #endif
+							// uni.reLaunch({
+							// 	url: goPages
+							// })
+						}, 3000)
+						return
+					}
 					switch (status) {
 						case 'ORDER_EXIST':
 						case 'EXTEND_ORDER':