From ddad021ff66e5a6f82b8e66d324add66874f81cc Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 7 May 2024 11:40:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=97=B6=20=20=E5=A6=82=E6=9E=9C=E6=98=AF=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=BC=BA=E5=88=B6=E7=99=BB=E5=BD=95=E4=B8=80?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/order/order_paymentcontroller.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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