Commit 56887d5b by 李萌萌

登陆接口调整

parent 2134920b
......@@ -69,7 +69,7 @@ export default {
methods: {
init() {
this.formFlag = true;
return;
return;
},
handleSubmit(type) {
const that = this;
......@@ -89,7 +89,7 @@ export default {
this.form.password = md5(this.form.password);
loginMD5Func(this.form)
.then((result) => {
const res=result.data;
const res = result.data;
if (res.result === "SUCCESS") {
sessionStorage.setItem("userdata", JSON.stringify(res.data));
let platList = res.data.platList;
......@@ -103,21 +103,22 @@ export default {
// return true
}
}
if (!flag) {
that.$router.push({ path: "/403" });
}
for (let j = 0; j < authList.length; j++) {
if (authList[j].code === "DTLW-101") {
// that.$message.success("登录成功!")
that.$router.push({ path: "/home" });
return;
}
if (authList[j].code === "DTLW-102") {
// that.$message.success("登录成功!")
that.$router.push({ path: "/index" });
return;
}
}
that.$router.push({ path: "/home" });
// if (!flag) {
// that.$router.push({ path: "/403" });
// }
// for (let j = 0; j < authList.length; j++) {
// if (authList[j].code === "DTLW-101") {
// // that.$message.success("登录成功!")
// that.$router.push({ path: "/home" });
// return;
// }
// if (authList[j].code === "DTLW-102") {
// // that.$message.success("登录成功!")
// that.$router.push({ path: "/index" });
// return;
// }
// }
} else {
if (type == "form") {
this.$router.push({ path: "/403" });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment