|
|
@@ -20,98 +20,100 @@ const routes = [
|
|
|
meta: {
|
|
|
title: "首页",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/phoneSign',
|
|
|
name: 'PhoneSign',
|
|
|
component: () => import('@/views/PhoneSign.vue'),
|
|
|
meta: {
|
|
|
title: "WiFi信号记录",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/wifiSign',
|
|
|
name: 'WifiSign',
|
|
|
component: () => import('@/views/WifiSign.vue'),
|
|
|
meta: {
|
|
|
title: "WiFi信号记录",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/white',
|
|
|
name: 'white',
|
|
|
component: () => import('@/views/white.vue'),
|
|
|
meta: {
|
|
|
title: "白名单",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/GSign',
|
|
|
name: 'GSign',
|
|
|
component: () => import('@/views/GSign.vue'),
|
|
|
meta: {
|
|
|
title: "0-6G扫描记录",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/equip',
|
|
|
name: 'Equip',
|
|
|
component: () => import('@/views/Equip.vue'),
|
|
|
meta: {
|
|
|
title: "设备管理",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/qrcodemanage',
|
|
|
name: 'qrcodemanage',
|
|
|
component: () => import('@/views/Qrcodemanage.vue'),
|
|
|
meta: {
|
|
|
title: "二维码管理",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/record',
|
|
|
name: 'record',
|
|
|
component: () => import('@/views/Record.vue'),
|
|
|
meta: {
|
|
|
title: "监测记录",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/region',
|
|
|
name: 'Region',
|
|
|
component: () => import('@/views/Region.vue'),
|
|
|
meta: {
|
|
|
- title: "关于我们",
|
|
|
+ title: "区域管理",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/hardware',
|
|
|
name: 'Hardware',
|
|
|
component: () => import('@/views/Hardware.vue'),
|
|
|
meta: {
|
|
|
title: "固件管理",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/police',
|
|
|
name: 'Police',
|
|
|
component: () => import('@/views/Police.vue'),
|
|
|
meta: {
|
|
|
title: "警务通管理",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/pwd',
|
|
|
name: 'Pwd',
|
|
|
component: () => import('@/views/Pwd.vue'),
|
|
|
meta: {
|
|
|
title: "密码修改",
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/basic',
|
|
|
name: 'Basic',
|
|
|
component: () => import('@/views/Basic.vue'),
|
|
|
meta: {
|
|
|
title: "no use",
|
|
|
}
|
|
|
- },{
|
|
|
- path: '/setting',
|
|
|
- name: 'Setting',
|
|
|
- component: () => import('@/views/Setting.vue'),
|
|
|
- meta: {
|
|
|
- title: "基本设置",
|
|
|
- }
|
|
|
- },{
|
|
|
+ }
|
|
|
+ // ,{
|
|
|
+ // path: '/setting',
|
|
|
+ // name: 'Setting',
|
|
|
+ // component: () => import('@/views/Setting.vue'),
|
|
|
+ // meta: {
|
|
|
+ // title: "基本设置",
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ , {
|
|
|
path: '/createmeetingqrcode',
|
|
|
name: 'Createmeetingqrcode',
|
|
|
component: () => import('@/views/Createmeetingqrcode.vue'),
|
|
|
@@ -124,15 +126,15 @@ const routes = [
|
|
|
path: '/login',
|
|
|
name: 'Login',
|
|
|
component: () => import( '../views/Login.vue')
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/wifiSign',
|
|
|
name: 'wifiSign',
|
|
|
component: () => import( '../components/WifiSign.vue')
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/equipInfo',
|
|
|
name: 'equipInfo',
|
|
|
component: () => import( '../components/EquipInfo.vue')
|
|
|
- },{
|
|
|
+ }, {
|
|
|
path: '/poster',
|
|
|
name: 'Poster',
|
|
|
component: () => import( '../views/Poster.vue')
|
|
|
@@ -156,15 +158,15 @@ const router = new VueRouter({
|
|
|
});
|
|
|
|
|
|
// 路由守卫
|
|
|
-router.beforeEach((to,from,next)=> {
|
|
|
+router.beforeEach((to, from, next) => {
|
|
|
NProgress.start();
|
|
|
- const isLogin = localStorage.token? true : false;
|
|
|
+ const isLogin = localStorage.token ? true : false;
|
|
|
|
|
|
- if(to.path == '/login' || to.path == '/register'|| to.path == '/poster'){//'login'和'register'相当于是路由白名单
|
|
|
+ if (to.path == '/login' || to.path == '/register' || to.path == '/poster') {//'login'和'register'相当于是路由白名单
|
|
|
next();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//如果token存在,就正常跳转,如果不存在,则说明未登陆,则跳转到'login'
|
|
|
- isLogin? next() : next("/login");
|
|
|
+ isLogin ? next() : next("/login");
|
|
|
}
|
|
|
});
|
|
|
|