From d84def8aad0a69158e0647a1341cd3030f05ff75 Mon Sep 17 00:00:00 2001 From: wuyibo <771227828@qq.com> Date: Sat, 29 Jun 2024 14:52:16 +0800 Subject: [PATCH] =?UTF-8?q?PC=E5=90=8E=E7=AB=AF=E4=BB=A3=E7=A0=81=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/.env.development | 2 ++ ruoyi-ui/.env.production | 2 ++ ruoyi-ui/.env.staging | 2 ++ ruoyi-ui/src/views/login.vue | 10 +++++++--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 3a35b011..7e3f3ccf 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -1,5 +1,7 @@ # 页面标题 VUE_APP_TITLE = dev-篮球Zone后台管理系统 +# 小程序Dev环境 +VUE_APP_WX_APPLES_ENV = develop # 开发环境配置 ENV = 'development' diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index 464c2f94..88b16766 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -1,5 +1,7 @@ # 页面标题 VUE_APP_TITLE = 篮球Zone后台管理系统 +# 小程序Dev环境 +VUE_APP_WX_APPLES_ENV = 'release' # 生产环境配置 ENV = 'production' diff --git a/ruoyi-ui/.env.staging b/ruoyi-ui/.env.staging index 23bf1352..eda4cf7f 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -1,5 +1,7 @@ # 页面标题 VUE_APP_TITLE = stage-篮球Zone后台管理系统 +# 小程序Dev环境 +VUE_APP_WX_APPLES_ENV = 'trial' # 测试环境配置 ENV = 'staging' diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 3d5a063e..ef6fc765 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -149,8 +149,10 @@ export default { getWxScanQrCode() { const timestamp = Date.now(); let checkCode = 'wxScanLogin'+timestamp; + let envVersion = process.env.VUE_APP_WX_APPLES_ENV; + console.log("envVersion "+envVersion) let params ={ - envVersion: 'develop', + envVersion: envVersion, checkPath: false, scene: checkCode, page: 'pages/wxScanLogin/wxScanLogin' @@ -164,7 +166,6 @@ export default { checkCode: checkCode } wxScanLoginCheck(param1).then(res1 => { - console.log(res1) if(res1.data){ console.log("登录成功") // 登录成功清除定时器 @@ -175,7 +176,7 @@ export default { console.log("登录失败") }); }else{ - console.log("登录失败") + //console.log("登录失败") } }); // 执行需要定时重复执行的任务 @@ -221,6 +222,9 @@ export default { if (tab.name === 'first') { this.getCode(); this.getCookie(); + if (this.timer) { + clearInterval(this.timer); // 切换到账号登录时清除定时器 + } } else { this.getWxScanQrCode(); }