入驻跳转后台路由创建
This commit is contained in:
@ -166,14 +166,40 @@ export const constantRoutes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/admin',
|
||||
path: '/one',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
redirect: '/one/enterprise',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
path: 'enterprise',
|
||||
component: () => import('@/views/admin/one/index'),
|
||||
name: 'Enterprise',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/two',
|
||||
component: Layout,
|
||||
redirect: '/two/expert',
|
||||
children: [
|
||||
{
|
||||
path: 'expert',
|
||||
component: () => import('@/views/admin/two/index'),
|
||||
name: 'Expert',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/three',
|
||||
component: Layout,
|
||||
redirect: '/three/expert',
|
||||
children: [
|
||||
{
|
||||
path: 'expert',
|
||||
component: () => import('@/views/admin/three/index'),
|
||||
name: 'Expert',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
const TokenKey = 'Cas-Token'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
|
3
src/views/admin/one/index.vue
Normal file
3
src/views/admin/one/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>index</div>
|
||||
</template>
|
3
src/views/admin/three/index.vue
Normal file
3
src/views/admin/three/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>index3</div>
|
||||
</template>
|
3
src/views/admin/two/index.vue
Normal file
3
src/views/admin/two/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>index2</div>
|
||||
</template>
|
@ -104,7 +104,23 @@ function handleStatus(item) {
|
||||
}
|
||||
}
|
||||
function handlePage(item) {
|
||||
console.log(item);
|
||||
alert("进入后台");
|
||||
let routeData = "";
|
||||
if (item.id == 1) {
|
||||
// 企业
|
||||
routeData = router.resolve({ path: "/one" });
|
||||
} else if (item.id == 2) {
|
||||
// 专家
|
||||
routeData = router.resolve({ path: "/two" });
|
||||
} else if (item.id == 4) {
|
||||
// 研究机构
|
||||
routeData = router.resolve({ path: "/three" });
|
||||
} else if (item.id == 8) {
|
||||
// 实验室
|
||||
routeData = router.resolve({ path: "/four" });
|
||||
} else if (item.id == 16) {
|
||||
// 科技经纪人
|
||||
routeData = router.resolve({ path: "/five" });
|
||||
}
|
||||
window.open(routeData.href, "_blank");
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user