jt
2023-02-15 d715d486163a7398226fd361ddd65b0055351242
pages/login/index.vue
@@ -281,12 +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);
                  //设置全局参数:user-用户信息
                  uni.setStorageSync('server',loginInfo.server);
                  // uni.setStorageSync('account',loginInfo.uname);
                  // uni.setStorageSync('password',loginInfo.pwd);
                  uni.setStorageSync('account',loginInfo.uname);
                  uni.setStorageSync('password',loginInfo.pwd);
                  // this.mutatLogin({loginid:success});
                  this.$store.commit('login',{
                     loginid:success 
@@ -298,12 +305,13 @@
                  //    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="开始登录";
            });