diff --git a/src/page/check/chose.vue b/src/page/check/chose.vue index 54dd7e8..5eac998 100644 --- a/src/page/check/chose.vue +++ b/src/page/check/chose.vue @@ -95,7 +95,6 @@ export default { }; }, mounted() { - this.$message.success('123') // console.log(this.$route.query) // 给定一个标志做判断显隐 this.flag = this.$route.query.flag; diff --git a/src/page/check/index.vue b/src/page/check/index.vue index 152173e..37e4ed1 100644 --- a/src/page/check/index.vue +++ b/src/page/check/index.vue @@ -2,7 +2,9 @@
质控管家管理系统
-
退出
+
+ {{ backFlag ? "返回" : "退出" }} +
选择后台
@@ -39,11 +41,15 @@ export default { tabFlag3: false, // 楼盘后台标志 tabFlag4: false, + backFlag: false, }; }, computed: {}, mounted() { - // console.log(123); + console.log(this.$route.query.backFlag); + if (this.$route.query.backFlag) { + this.backFlag = this.$route.query.backFlag; + } this.getTab(); // this.$message.success('123') }, @@ -71,33 +77,37 @@ export default { }, goloign() { // 对此进行判断,获取this.$route的参数,如果没有则退出登陆,有的话就返回之前的页面 - this.$confirm("是否退出系统, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { - this.$store.dispatch("LogOut").then(() => { - this.$router.push({ path: "/login" }); + if (this.backFlag) { + this.$router.back(); + } else { + this.$confirm("是否退出系统, 是否继续?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.$store.dispatch("LogOut").then(() => { + this.$router.push({ path: "/login" }); + }); }); - }); + } }, goindex(idx) { - localStorage.setItem('orgType',idx) + localStorage.setItem("orgType", idx); if (idx == 0) { // 质控管家后台 this.$router.push({ path: "/wel" }); } if (idx == 1) { // 代理商 - this.$router.push({ path: "/chose",query:{flag:1}}); + this.$router.push({ path: "/chose", query: { flag: 1 } }); } if (idx == 2) { // 公司后台 - this.$router.push({ path: "/chose",query:{flag:2}}); + this.$router.push({ path: "/chose", query: { flag: 2 } }); } if (idx == 3) { // 楼盘后台 - this.$router.push({ path: "/chose",query:{flag:3}}); + this.$router.push({ path: "/chose", query: { flag: 3 } }); } // this.$router.push({ path: "/chose" }); diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue index 0610878..cb0a8b2 100644 --- a/src/page/index/top/index.vue +++ b/src/page/index/top/index.vue @@ -189,7 +189,7 @@ export default { // }) // }, goChange(){ - + this.$router.push({ path: '/check',query:{backFlag:true}}); }, setCollapse() { this.$store.commit("SET_COLLAPSE");