From b7b9574ab0e4720d3cdde67a72de1614dbede82c Mon Sep 17 00:00:00 2001 From: sunday <153788231@qq.com> Date: Thu, 18 Apr 2024 22:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=99=BB=E5=BD=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96OPENID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/login/new_login_controller.js | 19 ++++++++++++++++--- yunshop-front-master/vue.config.js | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/yunshop-front-master/src/views/login/new_login_controller.js b/yunshop-front-master/src/views/login/new_login_controller.js index 3be9519..a4e0a00 100644 --- a/yunshop-front-master/src/views/login/new_login_controller.js +++ b/yunshop-front-master/src/views/login/new_login_controller.js @@ -84,9 +84,12 @@ export default { point:'积分', is_year_end_box_login:false, email_login:0, + code:'', }; }, mounted() { + console.log(this.$route.query,this.fun.isWeiXin(),this.$route.query.code) + this.code = this.$route.query.code||''; this.newLoginInformation() this.realTimePageHeight() this.start1 = false; @@ -107,6 +110,15 @@ export default { } else { this.appPlatform = false this.appShow = true; + 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; + } } this.apptoken = this.$route.query.apptoken; this.init_login(); @@ -302,6 +314,7 @@ export default { this.loginButtonStatus() }, mobile_login() { + console.log(this.form); if (this.fun.isTextEmpty(this.form.mobile)) { Toast(this.accountAndPasswordLogin ? "请填写账号" : "请填写手机号"); return; @@ -350,8 +363,9 @@ export default { if (this.mobile_login_code != 1) { delete this.form.code; } - - + if(this.code!=''){ + this.form.code = this.code; + } let yz_redirect = sessionStorage.getItem("yz_redirect"); const login_page_mode = this.login_page_mode; const login_diy_url = this.login_diy_url; @@ -362,7 +376,6 @@ export default { const encodedRedirect = this.isBase64(yz_redirect) ? yz_redirect : base64_encode(yz_redirect); this.form.yz_redirect = encodedRedirect; } - this.login(this.form); }, async login(data) { //登录 diff --git a/yunshop-front-master/vue.config.js b/yunshop-front-master/vue.config.js index 15ee81c..47acee7 100644 --- a/yunshop-front-master/vue.config.js +++ b/yunshop-front-master/vue.config.js @@ -112,7 +112,7 @@ module.exports = { }, proxy: { "/addons/yun_shop/api.php": { - target: "https://testbzt.cdlfjy.com/", //目标接口域名bztang.cdlfjy.com testbzt.cdlfjy.com + target: "https://shuizhi.test.cdlfjy.com/", //目标接口域名bztang.cdlfjy.com testbzt.cdlfjy.com changeOrigin: true, //是否跨域 secure: false // pathRewrite: {