diff --git a/yunshop-front-master/src/views/member/order/order_paymentcontroller.js b/yunshop-front-master/src/views/member/order/order_paymentcontroller.js index e18341b..2bf158b 100644 --- a/yunshop-front-master/src/views/member/order/order_paymentcontroller.js +++ b/yunshop-front-master/src/views/member/order/order_paymentcontroller.js @@ -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