|
|
@ -99,22 +99,22 @@ export default {
|
|
|
|
this.$refs.loginForm.validate((valid) => {
|
|
|
|
this.$refs.loginForm.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
// this.userInfo.password = this.$md5(this.userInfo.password); //密码加密
|
|
|
|
// this.userInfo.password = this.$md5(this.userInfo.password); //密码加密
|
|
|
|
this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //将token保存在vuex中
|
|
|
|
// this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //将token保存在vuex中
|
|
|
|
this.$store.commit("SET_USERINFO", "xytest"); //将用户信息保存在vuex中
|
|
|
|
// this.$store.commit("SET_USERINFO", "xytest"); //将用户信息保存在vuex中
|
|
|
|
this.$router.push("/realTimeMonitor");
|
|
|
|
// this.$router.push("/realTimeMonitor");
|
|
|
|
this.$message.success("登录成功");
|
|
|
|
// this.$message.success("登录成功");
|
|
|
|
// loginJoggle(this.userInfo)
|
|
|
|
loginJoggle(this.userInfo)
|
|
|
|
// .then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
// if (res.code == 200) {
|
|
|
|
if (res.code == 200) {
|
|
|
|
// this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中
|
|
|
|
this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中
|
|
|
|
// this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中
|
|
|
|
this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中
|
|
|
|
// this.$router.push("/realTimeMonitor");
|
|
|
|
this.$router.push("/realTimeMonitor");
|
|
|
|
// this.$message.success("登录成功");
|
|
|
|
this.$message.success("登录成功");
|
|
|
|
// } else {
|
|
|
|
} else {
|
|
|
|
// this.$message.error(res.msg);
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// })
|
|
|
|
})
|
|
|
|
// .catch((err) => {});
|
|
|
|
.catch((err) => {});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error("请输入账号和密码");
|
|
|
|
this.$message.error("请输入账号和密码");
|
|
|
|
console.log("error submit!!");
|
|
|
|
console.log("error submit!!");
|
|
|
|