Commit 397aaebb by tyk

1

parent cc6b1e22
......@@ -6,6 +6,14 @@ Vue.use(Router);
/* Layout */
import Layout from "@/layout";
let indexViewPath = () => import();
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
indexViewPath = () => import("@/views/zyyq/index");//手机端的组件
} else {
indexViewPath = () => import("@/views/zyyq/index1");//pc端的组件
}
/**
* Note: 路由配置项
*
......@@ -44,7 +52,7 @@ export const constantRoutes = [
{
path: "/web",
component: () => import("@/views/zyyq/index"),
component: indexViewPath,
hidden: true,
},
......@@ -171,12 +179,6 @@ export const dynamicRoutes = [
},
];
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
console.log('手机端')
} else {
console.log('pc端')
}
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
let routerReplace = Router.prototype.replace;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment