Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
陈峰
6 years ago
Commit
7d76357faca885547a2d5a528cc21cbf4d148c4d
1 parent
58480568
support sullscreen
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletions
doraemon/middleware/set-yoho-data.js
doraemon/views/layout.hbs
public/scss/layout/common.scss
doraemon/middleware/set-yoho-data.js
View file @
7d76357
...
...
@@ -54,6 +54,10 @@ module.exports = () => {
// IP 地址
yoho
.
clientIp
=
_getClientIp
(
req
);
if
(
req
.
query
.
fullscreen
)
{
yoho
.
fullScreen
=
true
;
}
yoho
.
isMobile
=
/
(
nokia|iphone|android|ipad|motorola|^mot
\-
|softbank|foma|docomo|kddi|up
\.
browser|up
\.
link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam
\-
|s
[
cg
]
h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte
\-
|longcos|pantech|gionee|^sie
\-
|portalmmm|jig
\s
browser|hiptop|^ucweb|^benq|haier|^lct|opera
\s
*mobi|opera
\*
mini|320x320|240x320|176x220
)
/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
// eslint-disable-line
yoho
.
isWechat
=
/micromessenger/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
yoho
.
isWeibo
=
/weibo/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
...
...
doraemon/views/layout.hbs
View file @
7d76357
...
...
@@ -77,7 +77,7 @@
<link
rel=
"apple-touch-startup-image"
href=
"https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png"
media=
"screen and (max-device-width: 640px)"
>
</head>
<body
class=
"
{{
pageStyle
}}{{#if
isWechat
}}
wechat-body
{{/if}}{{#if
width750
}}
width750
{{/if}}{{#if
isPassportPage
}}
passport-body
{{/if}}{{#if
isStarIndexPage
}}
star-index-bg
{{/if}}{{#if
isStarDetailPage
}}
star-class-body
{{/if}}{{#if
isInstallmentPage
}}{{#
unless
notOpen
}}
installment-body
{{/
unless
}}{{/if}}{{#if
@root
.
isMarsApp
}}
is-mars-app
{{/if}}{{#if
@root
.
isNowApp
}}
is-now-app
{{/if}}
"
>
<div
class=
"main-wrap"
id=
"main-wrap"
{{#if
appPath
}}
data-apppath=
'
{{{
appPath
}}}
'
{{/if}}{{#if
miniPath
}}
data-miniPath=
'
{{{
miniPath
}}}
'
{{/if}}{{#if
@root
.
wap
.
wechat
.
miniAutoJump
}}
data-miniautojump=
"1"
{{/if}}{{#if
@root
.
wap
.
wechat
.
backDownload
}}
data-backDownload=
'
{{
@root
.
wap
.
wechat
.
backDownload
}}
'
{{/if}}
>
<div
class=
"main-wrap
{{#if
fullScreen
}}
full-screen
{{/if}}
"
id=
"main-wrap"
{{#if
appPath
}}
data-apppath=
'
{{{
appPath
}}}
'
{{/if}}{{#if
miniPath
}}
data-miniPath=
'
{{{
miniPath
}}}
'
{{/if}}{{#if
@root
.
wap
.
wechat
.
miniAutoJump
}}
data-miniautojump=
"1"
{{/if}}{{#if
@root
.
wap
.
wechat
.
backDownload
}}
data-backDownload=
'
{{
@root
.
wap
.
wechat
.
backDownload
}}
'
{{/if}}
>
{{#if
systemUpdate
}}
{{>
updata
}}
...
...
public/scss/layout/common.scss
View file @
7d76357
...
...
@@ -67,6 +67,14 @@ button {
margin-left
:
auto
;
max-width
:
640px
;
width
:
100%
;
&
.full-screen
{
max-width
:
initial
!
important
;
.mobile-container
{
max-width
:
initial
!
important
;
}
}
}
/* 字体名称勿改的,APP做IP直连有使用到 */
...
...
Please
register
or
login
to post a comment