From d8bf63634b1a59b306a487344a5904d9ec9bb5f4 Mon Sep 17 00:00:00 2001 From: jt <jt@activesoft.com> Date: 星期三, 15 二月 2023 10:08:13 +0800 Subject: [PATCH] 扫码后软键盘关闭和重新登录后清除数据缓存改进 --- pages/login/index.vue | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/pages/login/index.vue b/pages/login/index.vue index c09b8e8..d4f42c4 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -146,8 +146,11 @@ </label> </checkbox-group> </form> - <button id='login' type="default" @tap="logind" class="btn_login">{{login}}</button> - </div> + <button id='login' type="default" @tap="logind" class="btn_login">{{login}}</button> + <p style="float:right; margin: 10px 10px;color:#c8c7cc"> + <span>鐗堟湰鍙凤細</span> + <span>{{version}}</span> + </p> <div class="" style="text-align: center;background: white;border-top: 0px solid #C0C0C0;color: #7cd0f8;position: absolute;bottom: 0;width: 100%;height: 24px;padding-top:3px;font-size: 11px;"> </div> </div> @@ -191,6 +194,7 @@ userName:account, userPwd:password, ischecked:ischecked, + version:"1.0.0", } }, // computed: mapState({ @@ -277,10 +281,19 @@ this.$data.login="loading......"; //鐧诲綍 this.$store.dispatch('login',loginInfo).then(success=>{ - // console.log(success); + console.log(success); if (success.code == '00000') { + //鐧诲綍鎴愬姛鍚庢竻绌虹紦瀛樻暟鎹�+ this.$store.commit("areaFunc",null); + this.$store.commit("classAttrList",null); + this.$store.commit("classGridStyleInfo",null); + this.$store.commit("dicValueInfo",null); + this.$store.commit("subClassAttrList",null); + this.$store.commit("subClassGridStyleInfo",null); //璁剧疆鍏ㄥ眬鍙傛暟锛歶ser-鐢ㄦ埛淇℃伅 uni.setStorageSync('server',loginInfo.server); + + // uni.setStorageSync('account',loginInfo.uname); // uni.setStorageSync('password',loginInfo.pwd); // this.mutatLogin({loginid:success}); @@ -294,19 +307,23 @@ // url:'../index/index?args=9999999999' // }); this.login="寮�鐧诲綍"; + }else{ uni.showModal({title:"閿欒",content:success.msg,showCancel:false,confirmText:"鍙栨秷"}); this.login="寮�鐧诲綍"; } }).catch(ex=>{ - // console.log(ex); + console.log(ex); uni.showModal({title:"閿欒",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"}); this.login="寮�鐧诲綍"; }); } }, onLoad() { - + plus.runtime.getProperty(plus.runtime.appid,(info)=>{ + // console.log(info); + this.$data.version=info.version; + }); } } </script> -- Gitblit v1.9.1