瀏覽代碼

解决app的微信支付

shish 8 月之前
父節點
當前提交
aadf58a442

+ 1 - 0
hdApp/.hbuilderx/launch.json

@@ -23,6 +23,7 @@
             "type" : "uniCloud"
         },
         {
+            "customPlaygroundType" : "local",
             "playground" : "custom",
             "type" : "uni-app:app-android"
         },

+ 17 - 1
hdApp/src/admin/billing/affirmGhs.vue

@@ -986,6 +986,9 @@ export default {
 	height: 100%;
 	display: flex;
 	flex-direction: column;
+	/* #ifdef APP-PLUS */
+	padding-bottom: 100upx;
+	/* #endif */
 	.affirm-view {
 		flex: 1;
 		padding: 20upx;
@@ -1166,8 +1169,21 @@ export default {
 		width: 100%;
 		height: 100upx;
 		background-color: #fff;
-
 		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
+		/* #ifdef APP-PLUS */
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 999;
+		/* #endif */
+		/* #ifdef MP-WEIXIN */
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 999;
+		/* #endif */
 		.price-view {
 			display: flex;
 			align-items: center;

+ 17 - 1
hdApp/src/admin/billing/affirmGhsBook.vue

@@ -629,6 +629,9 @@ export default {
 	height: 100%;
 	display: flex;
 	flex-direction: column;
+	/* #ifdef APP-PLUS */
+	padding-bottom: 100upx;
+	/* #endif */
 	.affirm-view {
 		flex: 1;
 		padding: 20upx;
@@ -755,8 +758,21 @@ export default {
 		width: 100%;
 		height: 100upx;
 		background-color: #fff;
-
 		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
+		/* #ifdef APP-PLUS */
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 999;
+		/* #endif */
+		/* #ifdef MP-WEIXIN */
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 999;
+		/* #endif */
 		.price-view {
 			display: flex;
 			align-items: center;

+ 4 - 4
hdApp/src/pagesPurchase/components/item.vue

@@ -84,10 +84,10 @@ export default {
 			type: Number,
 			default: 0
 		},
-		shopId:{
-			type: Number,
-			default: 0
-		},
+	shopId:{
+		type: [Number, String],
+		default: 0
+	},
 		showStock:{
 			type: String,
 			default: '0'

+ 5 - 4
hdApp/src/pagesPurchase/wechatPay.vue

@@ -45,9 +45,10 @@
         <!-- #ifdef APP-PLUS -->
         <div class="call-one-btn">
           <view>
-            <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="appWxPayFn">微信支付</button>
+            <!-- <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="appWxPayFn">微信支付</button> -->
+            <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="appAliPayFn(0)">微信支付</button>
           </view>
-          <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'ali-btn':'default']" :disabled="remainPayTime >0 ? false : true" @click="appAliPayFn">支付宝支付</button>
+          <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'ali-btn':'default']" :disabled="remainPayTime >0 ? false : true" @click="appAliPayFn(1)">支付宝支付</button>
           <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="debtPay" v-if="hasDebtPay === '1'">赊账</button>
         </div>
         <!-- #endif -->
@@ -184,14 +185,14 @@ export default {
         })
       })      
     },
-    appAliPayFn(){
+    appAliPayFn(payWay){
       let that = this
       // #ifdef MP-WEIXIN
       // #endif
       // #ifdef APP-PLUS
       uni.showLoading()
       let id = this.option.id ? this.option.id : 0   
-      purchaseAliPay({ orderSn: this.orderSn }).then(res => {
+      purchaseAliPay({ orderSn: this.orderSn,payWay:payWay }).then(res => {
         uni.hideLoading()
         if(res.code == 1){
           if(res.data.payUrl){