| | |
| | | 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 PopDesign = asyncLoadComponent(() => import('@/views/popdesign')) |
| | | const ImDesign = asyncLoadComponent(() => import('@/views/imdesign')) |
| | | const MenuDesign = asyncLoadComponent(() => import('@/views/menudesign')) |
| | | const BaseDesign = asyncLoadComponent(() => import('@/views/basedesign')) |
| | | const TableDesign = asyncLoadComponent(() => import('@/views/tabledesign')) |
| | | 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}, |
| | |
| | | {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: '/tabledesign/:param', name: 'tabledesign', component: TableDesign, auth: true}, |
| | | {path: '/popdesign/:param', name: 'popdesign', component: PopDesign, 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} |
| | | ] |
| | | |
| | |
| | | document.body.className = styles[_param.mstyle] |
| | | } |
| | | } |
| | | } catch { |
| | | } catch (e) { |
| | | console.warn('菜单参数解析错误!') |
| | | } |
| | | |
| | |
| | | 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}/>) |