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

master
Chopper 2021-06-16 16:44:30 +08:00
parent c65df5c741
commit c6dd5eac67
2 changed files with 20 additions and 34 deletions

View File

@ -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") {

View File

@ -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>