DESKTOP-812G6RA\PROW_006
9 days ago ee0581277156325f60fe3a1edfd8ac1645a77ec6
src/views/login/Login.vue
@@ -67,8 +67,21 @@
        methods:{
             register(){
                 this.$message({message:"登录成功",type:"success"});
                this.$router.push("/home");
                 this.$axios.post("api/Account/LoginApi",this.$qs.stringify({"userName":this.userName,"password":this.password,"type":0})).then(res=>{
                  if(res.data.IsSuccess){
                    this.$message({message:res.data.Content,type:"success"});
                    this.$emit("acceptlogin",false);
                      // window.sessionStorage.setItem('token',res.data.SystemUserId)
                    this.$store.commit('set_token',res.data.Extra.SessionId);
                    this.$store.commit('get_user',res.data.Extra.DisplayName);
                    this.$router.push("/home");
                  }else{
                    this.$message.error(res.data.Content);
                  }
                }).catch(err=>{
                  console.log(err);
                })
            },
        }