修改:支付时 如果是微信环境强制登录一下
This commit is contained in:
parent
d2ae467f3c
commit
ddad021ff6
|
|
@ -2,7 +2,8 @@ import { Toast } from "vant";
|
|||
// import QRCode from "qrcode";
|
||||
import yz_pay from "components/ui_components/yz_pay";
|
||||
import voucherPay from "./components/voucherPay";
|
||||
import { yzPay } from "../../../utils/yz_pay"; //引入支付方法
|
||||
import { yzPay } from "../../../utils/yz_pay";
|
||||
import base64_encode from "../../../utils/base64_encode"; //引入支付方法
|
||||
|
||||
var self = null;
|
||||
export default {
|
||||
|
|
@ -310,10 +311,25 @@ export default {
|
|||
Toast(response.msg);
|
||||
}
|
||||
);
|
||||
},
|
||||
isHasOpenid(){
|
||||
if(this.fun.isWeiXin() && this.code==''){
|
||||
console.log('微信登录',location.href)
|
||||
let page = base64_encode(location.href);
|
||||
let url = this.fun.getSiteRoot() + this.fun.getRealUrl("member.login.index",{'iscode':1,page:page});
|
||||
let URL = this.fun.deeplinkURL(url) + 't=' + Math.random();//添加随机数,防止部分机型微信环境下跳转后页面没有刷新
|
||||
console.log(URL)
|
||||
window.location.href = URL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.code = this.$route.query.code || "";
|
||||
this.isHasOpenid();
|
||||
},
|
||||
activated() {
|
||||
this.onReadOrderPay()
|
||||
this.onReadOrderPay();
|
||||
},
|
||||
components: {
|
||||
yz_pay,voucherPay
|
||||
|
|
|
|||
Loading…
Reference in New Issue