|
|
@@ -65,8 +65,15 @@ router.beforeEach(async (to, from, next) => {
|
|
|
}
|
|
|
});
|
|
|
router.afterEach((to, from) => {
|
|
|
- store.commit("changeTab", to.query.tabText);
|
|
|
- document.title = to.query.tabText;
|
|
|
+ if (to.name.indexOf("digitalEmpowermentCenter") != -1) {
|
|
|
+ store.commit("changeTab", "数字化赋能中心");
|
|
|
+ document.title = to.query.tabText;
|
|
|
+ } else {
|
|
|
+ let strArr = ["运输安全管理中心", "智能交易中心", "环境中心"];
|
|
|
+ let boo = strArr.includes(to.query.tabText);
|
|
|
+ store.commit("changeTab", boo ? to.query.tabText : "运输安全管理中心");
|
|
|
+ document.title = boo ? to.query.tabText : "运输安全管理中心";
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
app.use(router).use(ElementPlus).use(store).mount("#app");
|