Compare commits
No commits in common. "2a7aee361456c398ae633b3948a92fe67c0117b0" and "17a5a736dd513828db0b558e684b85421f7cf465" have entirely different histories.
2a7aee3614
...
17a5a736dd
29
App.vue
29
App.vue
|
|
@ -53,35 +53,6 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据用户类型跳转对应主页
|
|
||||||
const userType = that.vuex_userType || 0;
|
|
||||||
const currentPath = that._route.path;
|
|
||||||
|
|
||||||
// 只有在根路径("/")或 首页("/pages/home/index/index")或教师端首页("/pages/consultation/index")时才进行跳转判断
|
|
||||||
// 这样可以避免在其他有权限的页面刷新时被强制重定向
|
|
||||||
const isRootPath =
|
|
||||||
currentPath === "/" ||
|
|
||||||
currentPath === "/pages/home/index/index" ||
|
|
||||||
currentPath === "/pages/consultation/index";
|
|
||||||
|
|
||||||
if (isRootPath) {
|
|
||||||
if (userType === 1) {
|
|
||||||
// 教师端主页
|
|
||||||
if (currentPath !== "/pages/consultation/index") {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pages/consultation/index",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 学生端主页
|
|
||||||
if (currentPath !== "/pages/home/index/index") {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pages/home/index/index",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
if (!that.vuex_user.isFill) {
|
if (!that.vuex_user.isFill) {
|
||||||
this.$u.vuex("vuex_msgList", "");
|
this.$u.vuex("vuex_msgList", "");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue