1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

update: 删除后台管理相关页面代码

This commit is contained in:
小莫唐尼
2024-06-02 18:46:36 +08:00
parent 3b0ef59ca7
commit 19c4e12a5b
57 changed files with 17 additions and 8896 deletions
+3 -61
View File
@@ -8,12 +8,7 @@ const router = createRouter({
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
});
import {
wxLogin,
appWxLogin
} from '@/api/login.js'
import {
checkHasWxLogin,
checkHasAdminLogin
@@ -21,60 +16,7 @@ import {
//全局路由前置守卫
router.beforeEach((to, from, next) => {
// 管理页面:超管
if (to.meta && to.meta.auth == 'admin') {
if (checkHasAdminLogin()) {
next()
} else {
uni.$eShowModal({
title: '提示',
content: '未登录超管账号或登录状态已过期,是否立即登录?',
showCancel: true,
cancelText: '否',
cancelColor: '#999999',
confirmText: '是',
confirmColor: '#03a9f4'
}).then(res => {
uni.navigateTo({
url: '/pagesB/login/login'
})
}).catch(err => {
uni.switchTab({
url: '/pages/tabbar/about/about'
})
})
next(false)
}
}
// 普通用户需要登录
else if (to.meta && to.meta.auth == 'login') {
if (checkHasWxLogin()) {
next()
} else {
uni.$eShowModal({
title: '提示',
content: `主人,您好像还没有登录呢?`,
showCancel: true,
cancelText: '取消',
cancelColor: '#999999',
confirmText: '登录',
confirmColor: '#03a9f4'
}).then(res => {
// #ifdef APP-PLUS
appWxLogin()
// #endif
// #ifdef MP-WEIXIN
wxLogin()
// #endif
// #ifndef APP-PLUS||MP-WEIXIN
// #endif
}).catch(err => {})
next(false)
}
} else {
next();
}
next();
});
// 全局路由后置守卫
router.afterEach((to, from) => {
@@ -84,4 +26,4 @@ router.afterEach((to, from) => {
export {
router,
RouterMount
}
}