You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SRuml/SuperRice/vue/node_modules/.cache/babel-loader/4aeac344a85c9dc2fc304b243d7...

1 line
11 KiB

{"ast":null,"code":"import Vue from 'vue';\nimport VueRouter from 'vue-router';\nVue.use(VueRouter);\n\n// 解决导航栏或者底部导航tabBar中的vue-router在3.0版本以上频繁点击菜单报错的问题。\nconst originalPush = VueRouter.prototype.push;\nVueRouter.prototype.push = function push(location) {\n return originalPush.call(this, location).catch(err => err);\n};\nconst routes = [{\n path: '/',\n name: 'Manager',\n component: () => import('../views/Manager.vue'),\n children: [{\n path: '403',\n name: 'NoAuth',\n meta: {\n name: '无权限'\n },\n component: () => import('../views/manager/403')\n }, {\n path: 'home',\n name: 'Home',\n meta: {\n name: '系统首页'\n },\n component: () => import('../views/manager/Home')\n }, {\n path: 'admin',\n name: 'Admin',\n meta: {\n name: '管理员信息'\n },\n component: () => import('../views/manager/Admin')\n }, {\n path: 'business',\n name: 'Business',\n meta: {\n name: '商家信息'\n },\n component: () => import('../views/manager/Business')\n }, {\n path: 'user',\n name: 'User',\n meta: {\n name: '用户信息'\n },\n component: () => import('../views/manager/User')\n }, {\n path: 'adminPerson',\n name: 'AdminPerson',\n meta: {\n name: '个人信息'\n },\n component: () => import('../views/manager/AdminPerson')\n }, {\n path: 'businessPerson',\n name: 'BusinessPerson',\n meta: {\n name: '个人信息'\n },\n component: () => import('../views/manager/BusinessPerson')\n }, {\n path: 'password',\n name: 'Password',\n meta: {\n name: '修改密码'\n },\n component: () => import('../views/manager/Password')\n }, {\n path: 'notice',\n name: 'Notice',\n meta: {\n name: '公告信息'\n },\n component: () => import('../views/manager/Notice')\n }, {\n path: 'type',\n name: 'Type',\n meta: {\n name: '分类信息'\n },\n component: () => import('../views/manager/Type')\n }, {\n path: 'goods',\n name: 'Goods',\n meta: {\n name: '商品信息'\n },\n component: () => import('../views/manager/Goods')\n }]\n}, {\n path: '/front',\n name: 'Front',\n component: () => import('../views/Front.vue'),\n children: [{\n path: 'home',\n name: 'Home',\n meta: {\n name: '系统首页'\n },\n component: () => import('../views/front/Home')\n }, {\n path: 'person',\n name: 'Person',\n meta: {\n name: '个人信息'\n },\n component: () => import('../views/front/Person')\n }, {\n path: 'detail',\n name: 'Detail',\n meta: {\n name: '商品详情'\n },\n component: () => import('../views/front/Detail')\n }]\n}, {\n path: '/login',\n name: 'Login',\n meta: {\n name: '登录'\n },\n component: () => import('../views/Login.vue')\n}, {\n path: '/register',\n name: 'Register',\n meta: {\n name: '注册'\n },\n component: () => import('../views/Register.vue')\n}, {\n path: '*',\n name: 'NotFound',\n meta: {\n name: '无法访问'\n },\n component: () => import('../views/404.vue')\n}];\nconst router = new VueRouter({\n mode: 'history',\n base: process.env.BASE_URL,\n routes\n});\n// 路由守卫\nrouter.beforeEach((to, from, next) => {\n let user = JSON.parse(localStorage.getItem(\"xm-user\") || '{}');\n if (to.path === '/') {\n if (user.role) {\n if (user.role === 'USER') {\n next('/front/home');\n } else {\n next('/home');\n }\n } else {\n next('/login');\n }\n } else {\n next();\n }\n});\nexport default router;","map":{"version":3,"names":["Vue","VueRouter","use","originalPush","prototype","push","location","call","catch","err","routes","path","name","component","children","meta","router","mode","base","process","env","BASE_URL","beforeEach","to","from","next","user","JSON","parse","localStorage","getItem","role"],"sources":["D:/BaiduNetdiskDownload/项目脚手架/项目脚手架/manager/vue/src/router/index.js"],"sourcesContent":["import Vue from 'vue'\r\nimport VueRouter from 'vue-router'\r\n\r\nVue.use(VueRouter)\r\n\r\n// 解决导航栏或者底部导航tabBar中的vue-router在3.0版本以上频繁点击菜单报错的问题。\r\nconst originalPush = VueRouter.prototype.push\r\nVueRouter.prototype.push = function push (location) {\r\n return originalPush.call(this, location).catch(err => err)\r\n}\r\n\r\nconst routes = [\r\n {\r\n path: '/',\r\n name: 'Manager',\r\n component: () => import('../views/Manager.vue'),\r\n children: [\r\n { path: '403', name: 'NoAuth', meta: { name: '无权限' }, component: () => import('../views/manager/403') },\r\n { path: 'home', name: 'Home', meta: { name: '系统首页' }, component: () => import('../views/manager/Home') },\r\n { path: 'admin', name: 'Admin', meta: { name: '管理员信息' }, component: () => import('../views/manager/Admin') },\r\n { path: 'business', name: 'Business', meta: { name: '商家信息' }, component: () => import('../views/manager/Business') },\r\n { path: 'user', name: 'User', meta: { name: '用户信息' }, component: () => import('../views/manager/User') },\r\n { path: 'adminPerson', name: 'AdminPerson', meta: { name: '个人信息' }, component: () => import('../views/manager/AdminPerson') },\r\n { path: 'businessPerson', name: 'BusinessPerson', meta: { name: '个人信息' }, component: () => import('../views/manager/BusinessPerson') }, { path: 'password', name: 'Password', meta: { name: '修改密码' }, component: () => import('../views/manager/Password') },\r\n { path: 'notice', name: 'Notice', meta: { name: '公告信息' }, component: () => import('../views/manager/Notice') },\r\n { path: 'type', name: 'Type', meta: { name: '分类信息' }, component: () => import('../views/manager/Type') },\r\n { path: 'goods', name: 'Goods', meta: { name: '商品信息' }, component: () => import('../views/manager/Goods') }, ]\r\n },\r\n {\r\n path: '/front',\r\n name: 'Front',\r\n component: () => import('../views/Front.vue'),\r\n children: [\r\n { path: 'home', name: 'Home', meta: { name: '系统首页' }, component: () => import('../views/front/Home') },\r\n { path: 'person', name: 'Person', meta: { name: '个人信息' }, component: () => import('../views/front/Person') },\r\n { path: 'detail', name: 'Detail', meta: { name: '商品详情' }, component: () => import('../views/front/Detail') }, ]\r\n },\r\n { path: '/login', name: 'Login', meta: { name: '登录' }, component: () => import('../views/Login.vue') },\r\n { path: '/register', name: 'Register', meta: { name: '注册' }, component: () => import('../views/Register.vue') },\r\n { path: '*', name: 'NotFound', meta: { name: '无法访问' }, component: () => import('../views/404.vue') },\r\n]\r\n\r\nconst router = new VueRouter({\r\n mode: 'history',\r\n base: process.env.BASE_URL,\r\n routes\r\n})\r\n// 路由守卫\r\nrouter.beforeEach((to ,from, next) => {\r\n let user = JSON.parse(localStorage.getItem(\"xm-user\") || '{}');\r\n if (to.path === '/') {\r\n if (user.role) {\r\n if (user.role === 'USER') {\r\n next('/front/home')\r\n } else {\r\n next('/home')\r\n }\r\n } else {\r\n next('/login')\r\n }\r\n } else {\r\n next()\r\n }\r\n})\r\n\r\nexport default router\r\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AACrB,OAAOC,SAAS,MAAM,YAAY;AAElCD,GAAG,CAACE,GAAG,CAACD,SAAS,CAAC;;AAElB;AACA,MAAME,YAAY,GAAGF,SAAS,CAACG,SAAS,CAACC,IAAI;AAC7CJ,SAAS,CAACG,SAAS,CAACC,IAAI,GAAG,SAASA,IAAIA,CAAEC,QAAQ,EAAE;EAClD,OAAOH,YAAY,CAACI,IAAI,CAAC,IAAI,EAAED,QAAQ,CAAC,CAACE,KAAK,CAACC,GAAG,IAAIA,GAAG,CAAC;AAC5D,CAAC;AAED,MAAMC,MAAM,GAAG,CACb;EACEC,IAAI,EAAE,GAAG;EACTC,IAAI,EAAE,SAAS;EACfC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC,sBAAsB,CAAC;EAC/CC,QAAQ,EAAE,CACR;IAAEH,IAAI,EAAE,KAAK;IAAEC,IAAI,EAAE,QAAQ;IAAEG,IAAI,EAAE;MAAEH,IAAI,EAAE;IAAM,CAAC;IAAEC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC,sBAAsB;EAAE,CAAC,EACvG;IAAEF,IAAI,EAAE,MAAM;IAAEC,IAAI,EAAE,MAAM;IAAEG,IAAI,EAAE;MAAEH,IAAI,EAAE;IAAO,CAAC;IAAEC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC,uBAAuB;EAAE,CAAC,EACxG;IAAEF,IAAI,EAAE,OAAO;IAAEC,IAAI,EAAE,OAAO;IAAEG,IAAI,EAAE;MAAEH,IAAI,EAAE;IAAQ,CAAC;IAAEC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC,wBAAwB;EAAE,CAAC,EAC5G;IAAEF,IAAI,EAAE,UAAU;IAAEC,IAAI,EAAE,UAA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