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(); }