Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center-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
吴学德
gdtel-gztel-school-center-ui
Commits
2f1d461b
Commit
2f1d461b
authored
Mar 24, 2020
by
弓厶
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录页的浏览器提示
parent
9c7128b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
src/views/user/Login.vue
+49
-0
No files found.
src/views/user/Login.vue
View file @
2f1d461b
...
...
@@ -125,6 +125,7 @@ export default {
created
()
{
Vue
.
ls
.
remove
(
ACCESS_TOKEN
)
this
.
getRouterData
();
this
.
browserTips
();
},
methods
:
{
...
mapActions
([
"Login"
,
"Logout"
]),
...
...
@@ -289,6 +290,54 @@ export default {
});
})
},
// 提示浏览器版本
browserTips
()
{
//取得浏览器的userAgent字符串
let
userAgent
=
navigator
.
userAgent
;
try
{
//判断是否IE
<
11
浏览器
let
isIE
=
userAgent
.
indexOf
(
"compatible"
)
>
-
1
&&
userAgent
.
indexOf
(
"MSIE"
)
>
-
1
;
//判断是否IE的Edge浏览器
let
isEdge
=
userAgent
.
indexOf
(
"Edge"
)
>
-
1
&&
!
isIE
;
let
isIE11
=
userAgent
.
indexOf
(
'Trident'
)
>
-
1
&&
userAgent
.
indexOf
(
"rv:11.0"
)
>
-
1
;
if
(
isIE
)
{
let
reIE
=
new
RegExp
(
"MSIE (
\\
d+
\\
.
\\
d+);"
);
reIE
.
test
(
userAgent
);
let
fIEVersion
=
parseFloat
(
RegExp
[
"$1"
]);
if
(
fIEVersion
==
7
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 7 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
else
if
(
fIEVersion
==
8
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 8 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
else
if
(
fIEVersion
==
9
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 9 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
else
if
(
fIEVersion
==
10
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 10 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
else
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 6及其以下版本浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
}
else
if
(
isEdge
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE Edge 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
else
if
(
isIE11
)
{
this
.
$notification
.
error
({
message
:
"系统不兼容 IE 11 浏览器,推荐使用Chrome。请到https://www.google.cn/chrome 下载。如果使用双核浏览器请切换极速模式!"
});
}
}
finally
{
console
.
log
(
userAgent
);
}
}
}
}
</
script
>
...
...
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