Commit 3bf757b3 authored by 吴婷慧's avatar 吴婷慧

登录重定向问题

parent 23e10e12
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
this.$apis.LOGIN(this.form).then((res) => { this.$apis.LOGIN(this.form).then((res) => {
if (res.returnCode === "0000") { if (res.returnCode === "0000") {
this.$store.commit("common/setUserInfo", res.content); this.$store.commit("common/setUserInfo", res.content);
const path = this.$router.query.redirect || "/customer"; const path = this.$route.query && this.$route.query.redirect || "/customer";
this.$router.replace(path); this.$router.replace(path);
} else { } else {
this.$message.error(res.returnMsg || "出现错误"); this.$message.error(res.returnMsg || "出现错误");
......
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