Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李奇
8 years ago
Commit
d8febaf68756075f788c1c9a30aeb761aff0b3ec
1 parent
7f7f281f
fixed:不支持浏览器渲染页添加
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
4 deletions
apps/service/controllers/client.js
apps/service/views/action/unsupport.hbs
apps/service/views/partial/un-support.hbs
apps/service/controllers/client.js
View file @
d8febaf
...
...
@@ -14,6 +14,9 @@ const clientService = require('../models/client-service');
* 在线客服客户端
*/
const
index
=
(
req
,
res
)
=>
{
let
reg
=
/MSIE
\s?[
987
]\.
0/i
;
let
userAgent
=
req
.
headers
[
'user-agent'
];
let
unSupport
=
reg
.
test
(
userAgent
);
let
type
=
2
;
let
imgSize
=
'86x120'
;
let
encryptedUid
=
aes
.
encryptionUid
(
req
.
user
.
uid
);
...
...
@@ -22,10 +25,16 @@ const index = (req, res) => {
layout
:
false
};
clientService
.
getClientData
(
type
,
encryptedUid
,
imgSize
)
.
then
(
result
=>
{
res
.
render
(
'client'
,
Object
.
assign
(
data
,
result
));
if
(
unSupport
)
{
res
.
render
(
'unsupport'
,
{
layout
:
false
});
}
else
{
clientService
.
getClientData
(
type
,
encryptedUid
,
imgSize
)
.
then
(
result
=>
{
res
.
render
(
'client'
,
Object
.
assign
(
data
,
result
));
});
}
};
/**
...
...
apps/service/views/action/unsupport.hbs
0 → 100644
View file @
d8febaf
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
{{
title
}}
</title>
<meta
name=
"keywords"
content=
"
{{
keywords
}}
"
>
<meta
name=
"description"
content=
"
{{
description
}}
"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
>
<meta
http-equiv=
"cleartype"
content=
"on"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<meta
content=
"telephone=no"
name=
"format-detection"
/>
<meta
content=
"email=no"
name=
"format-detection"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"renderer"
content=
"webkit"
/>
<style>
.un-support
{
text-align
:
center
;
}
</style>
</head>
<body>
<div
class=
"un-support"
>
<div
class=
"tip"
>
为了保证您使用客服系统的体验,建议您使用谷歌Chrome、IE11等浏览器访问本页面。
</div>
<div
class=
"tip"
>
如果您的浏览器支持极速模式,请尝试开启。
</div>
</div>
</body>
</html>
...
...
apps/service/views/partial/un-support.hbs
View file @
d8febaf
<div
class=
"un-support"
>
<div
class=
"back"
></div>
<div
class=
"tip"
>
为了保证您使用客服系统的体验,建议您使用其他浏览器(谷歌chrome、IE10以上、火狐等)访问本客服页面。
</div>
<div
class=
"tip"
>
为了保证您使用客服系统的体验,建议您使用谷歌Chrome、IE11等浏览器访问本页面。
</div>
<div
class=
"tip"
>
如果您的浏览器支持极速模式,请尝试开启。
</div>
</div>
...
...
Please
register
or
login
to post a comment