Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yq-ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaopanyu
yq-ui
Commits
397aaebb
Commit
397aaebb
authored
Oct 25, 2024
by
tyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cc6b1e22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/router/index.js
+9
-7
No files found.
src/router/index.js
View file @
397aaebb
...
@@ -6,6 +6,14 @@ Vue.use(Router);
...
@@ -6,6 +6,14 @@ Vue.use(Router);
/* Layout */
/* Layout */
import
Layout
from
"@/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: 路由配置项
* Note: 路由配置项
*
*
...
@@ -44,7 +52,7 @@ export const constantRoutes = [
...
@@ -44,7 +52,7 @@ export const constantRoutes = [
{
{
path
:
"/web"
,
path
:
"/web"
,
component
:
()
=>
import
(
"@/views/zyyq/index"
)
,
component
:
indexViewPath
,
hidden
:
true
,
hidden
:
true
,
},
},
...
@@ -171,12 +179,6 @@ export const dynamicRoutes = [
...
@@ -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
routerPush
=
Router
.
prototype
.
push
;
let
routerReplace
=
Router
.
prototype
.
replace
;
let
routerReplace
=
Router
.
prototype
.
replace
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment