From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/router/index.js | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index f496dec..434fcd4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,13 +13,17 @@ const Login = asyncLoadComponent(() => import('@/views/login')) const NotFound = asyncComponent(() => import('@/views/404')) const AppManage = asyncLoadComponent(() => import('@/views/appmanage')) +const AppCheck = asyncLoadComponent(() => import('@/views/appcheck')) const PCDesign = asyncLoadComponent(() => import('@/views/pcdesign')) const MobDesign = asyncLoadComponent(() => import('@/views/mobdesign')) +const ImDesign = asyncLoadComponent(() => import('@/views/imdesign')) const MenuDesign = asyncLoadComponent(() => import('@/views/menudesign')) +const BaseDesign = asyncLoadComponent(() => import('@/views/basedesign')) const BillPrint = asyncLoadComponent(() => import('@/views/billprint')) const PrintT = asyncLoadComponent(() => import('@/views/printTemplate')) const Interface = asyncLoadComponent(() => import('@/views/interface')) const RoleManage = asyncLoadComponent(() => import('@/views/rolemanage')) +const SystemFunc = asyncLoadComponent(() => import('@/views/systemfunc')) const routers = [ {path: '/login', name: 'login', component: Login, auth: false}, @@ -29,12 +33,18 @@ {path: '/main', name: 'main', component: Main, auth: true}, {path: '/design', name: 'design', component: Design, auth: true}, {path: '/appmanage', name: 'appmanage', component: AppManage, auth: true}, + {path: '/appcheck', name: 'appcheck', component: AppCheck, auth: true}, {path: '/pcdesign/:param', name: 'pcdesign', component: PCDesign, auth: true}, {path: '/mobdesign/:param', name: 'mobdesign', component: MobDesign, auth: true}, + {path: '/imdesign/:param', name: 'imdesign', component: ImDesign, auth: true}, {path: '/menudesign/:param', name: 'menudesign', component: MenuDesign, auth: true}, + {path: '/basedesign/:param', name: 'basedesign', component: BaseDesign, auth: true}, {path: '/billprint/:param', name: 'billprint', component: BillPrint, auth: true}, + {path: '/docprint/:menuId', name: 'docprint', component: BillPrint, auth: false}, + {path: '/docprint/:menuId/:id', name: 'docprint', component: BillPrint, auth: false}, {path: '/paramsmain/:param', name: 'pmain', component: Main, auth: true}, {path: '/role/:param', name: 'role', component: RoleManage, auth: true}, + {path: '/hs', name: 'hs', component: SystemFunc, auth: true}, {path: '/interface', name: 'interface', component: Interface, auth: true} ] @@ -69,7 +79,7 @@ document.body.className = styles[_param.mstyle] } } - } catch { + } catch (e) { console.warn('鑿滃崟鍙傛暟瑙f瀽閿欒锛�') } @@ -81,6 +91,12 @@ let authCode = localStorage.getItem(window.location.href.split('#')[0] + 'AuthCode') // 鍒ゆ柇绯荤粺鏄惁鍦ㄦ巿鏉冩湡闄愬唴 let _s = md5('mksoft' + moment().format('YYYYMMDD')) let isauth = authCode && authCode.includes(_s) + let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6) + let key1 = window.GLOB.licenseKey ? window.GLOB.licenseKey.substring(0, 6) : '' + + if (key1 === key) { + isauth = true + } if (userId && isauth) { return (<item.component {...props}/>) -- Gitblit v1.8.0