Kaynağa Gözat

还原登录问题,h5支付宝支付无法支付原因。

Chopper 5 yıl önce
ebeveyn
işleme
c6dd5eac67
2 değiştirilmiş dosya ile 20 ekleme ve 34 silme
  1. 11 10
      pages/cart/payment/payOrder.vue
  2. 9 24
      pages/passport/onClickLogin.vue

+ 11 - 10
pages/cart/payment/payOrder.vue

@@ -148,7 +148,7 @@
 
 			awaitPay(payment){
 
-				 this.$u.debounce(this.pay(payment), 3000)
+				 this.pay(payment)
 			
 			},
 
@@ -225,16 +225,17 @@
 				await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
 					(res) => {
 						let response = res.data;
-						//如果支付异常
-						if (!response.success) {
-
-							uni.showModal({
-								content: response.message,
-								showCancel: false,
-							})
-							return;
+						//如果非支付宝支付才需要进行判定,因为支付宝h5支付是直接输出的,没有返回所谓的消息状态
+						if(paymentMethod !== "ALIPAY"){
+							//如果支付异常
+							if (!response.success) {
+								uni.showModal({
+									content: response.message,
+									showCancel: false,
+								})
+								return;
+							}
 						}
-
 						if (paymentMethod === "ALIPAY") {
 							document.write(response);
 						} else if (paymentMethod === "WECHAT") {

+ 9 - 24
pages/passport/onClickLogin.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="form">
     <u-form ref="validateCodeForm">
-      <div class="login-apple">
-        <image class="apple" src="/static/signIn.png" mode="" />
-      </div>
       <div class="login-list">
         <!-- 循环出当前可使用的第三方登录模式 -->
         <div class="login-item" v-for="(item,index) in loginList" :key="index">
@@ -11,17 +8,16 @@
           <div>{{item.title}}</div>
         </div>
       </div>
-
       <view class="text-tips cell" @click="clickCodeLogin">账号密码登录</view>
     </u-form>
   </div>
 </template>
- 
+
 <script>
 import { webConnect, openIdLogin } from "@/api/connect.js";
 import { whetherNavigate } from "@/utils/Foundation"; //登录跳转
 import { getUserInfo } from "@/api/members";
-import storage from "@/utils/storage.js";
+import storage from "@/utils/storage.js";
 import api from "@/config/api.js";
 
 export default {
@@ -132,9 +128,9 @@ export default {
           });
         } else {
           uni.showToast({
-            title: "配置有误请联系管理员",
+            title: '配置有误请联系管理员',
             duration: 2000,
-            icon: "none",
+            icon:"none"
           });
         }
       });
@@ -152,9 +148,9 @@ export default {
       }
 
       // #ifdef H5
-      let code = connectLogin.code;
-      let buyer = api.buyer;
-      window.open(buyer + `/connect/login/web/` + code, "_self");
+      let code = connectLogin.code;
+	  let buyer = api.buyer;
+      window.open(buyer+`/connect/login/web/`+code, "_self");
       // #endif
       // #ifdef APP-PLUS
       this.nonH5OpenId(connectLogin);
@@ -248,7 +244,7 @@ export default {
             storage.setUserInfo(user.data.result);
             storage.setHasLogin(true);
           });
-          whetherNavigate();
+          whetherNavigate()
         }
       });
     },
@@ -267,10 +263,7 @@ export default {
 .submit {
   margin: 80rpx 0 40rpx 0;
 }
-.apple {
-  width: 500rpx;
-  height: 80rpx;
-}
+
 .login-list {
   display: flex;
   padding: 40rpx 0;
@@ -285,12 +278,4 @@ export default {
     }
   }
 }
-
-.login-apple{
-  margin: 80rpx 0;
-  width: 100%;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
 </style>