V1.2.0需求完成测试版

This commit is contained in:
2025-08-01 16:33:33 +08:00
parent 4e764d2d17
commit bc0cd959f0
75 changed files with 2191 additions and 1973 deletions

View File

@@ -108,22 +108,7 @@ const childrenRoutes = [
}
},
{//编辑器测试markdown
path: 'markdown',
name: 'Markdown',
component: () => import('../views/markdown.vue'),
meta: {
title: 'markdown编辑器测试',
// description: i18n.t(`seo.helpCenter`),
allAuthority: [`all`],
// keywords: {
// en: 'Help Center,Beginner Guide,Mining Data,Frequently Asked Questions,Announcement Center,Other',
// zh: '帮助中心,新手入门,常见问题,公告中心'
// }
}
},
{//广播页面
path: 'broadcast',
name: 'Broadcast',
@@ -911,67 +896,7 @@ router.beforeEach((to, from, next) => {
// if (jurisdiction && jurisdiction.roleKey == `back_admin`) {
// if (to.name == 'Login' || to.name == 'Register' || jurisdiction && jurisdiction.roleKey && to.meta.allAuthority.includes(jurisdiction.roleKey)) {
// return next();
// } else {
// // 无权限
// Message({
// showClose: true,
// message: `当前身份只能访问后台管理系统`,
// type: 'error'
// });
// localStorage.setItem("activeIndex", `1`);
// return next({ path: `/${lang}/broadcast` });
// }
// } else {
// // 未登录
// if (!token) {
// console.log(`未登录`);
// if (
// to.meta.allAuthority &&
// (
// to.meta.allAuthority[0] === 'all' ||
// (jurisdiction && jurisdiction.roleKey && to.meta.allAuthority.includes(jurisdiction.roleKey))
// )
// ) {
// return next();
// } else {
// // 无权限
// Message({
// showClose: true,
// message: i18n.t(`mining.jurisdiction`),
// type: 'error'
// });
// return next({ path: `/${lang}/login` });
// }
// } else {
// if (to.name === 'Login' || to.name === 'Register') {
// return next({ path: `/${lang}` });
// } else if (to.meta.allAuthority &&
// (
// to.meta.allAuthority[0] === 'all' ||
// (jurisdiction && jurisdiction.roleKey && to.meta.allAuthority.includes(jurisdiction.roleKey))
// )
// ) {
// return next();
// } else {
// // 无权限
// Message({
// showClose: true,
// message: i18n.t(`mining.jurisdiction`),
// type: 'error'
// });
// return next({ path: `/${lang}/login` });
// }
// }
// }
// --------------------------
// 未登录
if (!token) {
@@ -1000,9 +925,11 @@ if (!token) {
if (jurisdiction && jurisdiction.roleKey == `back_admin`) {
if (to.name == 'Login' || to.name == 'Register' || to.path == `/${lang}` || jurisdiction && jurisdiction.roleKey && to.meta.allAuthority.includes(jurisdiction.roleKey)) {
if (to.name == 'Login' || to.name == 'Register' || jurisdiction && jurisdiction.roleKey && to.meta.allAuthority.includes(jurisdiction.roleKey)) {
return next();
} else {
} else if(to.path == `/${lang}`) {
return next({ path: `/${lang}/userManagement` });
}else {
// 无权限
Message({
showClose: true,
@@ -1014,6 +941,7 @@ if (!token) {
}
} else {
if (to.name === 'Login' || to.name === 'Register') {