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
Plain Diff
Browse Files
Authored by
baoss
5 years ago
Commit
b98283b1108bb1772a73c6df7e065ea41afcd442
2 parents
a1c75e56
accf0054
Merge branch 'userAgentTest' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
120 additions
and
21 deletions
apps/activity/views/action/group/goodsDetail.hbs
apps/activity/views/action/group/group-list.hbs
apps/activity/views/action/yoluck/list.hbs
apps/activity/views/partial/group/group-tabbar.hbs
apps/activity/views/partial/yoluck-back/action-bar.hbs
apps/activity/views/partial/yoluck/action-bar.hbs
apps/mip/views/action/product/detail.hbs
apps/mip/views/partial/mip-shop-footer.hbs
apps/product/views/action/detail/new/detail.hbs
apps/product/views/action/global/detail.hbs
apps/product/views/partial/reds-shop/footer.hbs
apps/product/views/partial/shop/shop-footer.hbs
doraemon/views/partial/footer-tab.hbs
public/hbs/activity/group/chose-panel.hbs
public/hbs/common/chose-panel-new.hbs
public/hbs/common/chose-panel.hbs
public/hbs/product/detail/infodata.hbs
public/js/common.js
public/js/yoho-app.js
public/scss/activity/group/group-detail.scss
public/scss/activity/group/group-progress.page.scss
public/scss/activity/yoluck/action-bar.scss
public/scss/cart/chose-panel.scss
public/scss/layout/common.scss
apps/activity/views/action/group/goodsDetail.hbs
View file @
b98283b
...
...
@@ -134,7 +134,7 @@
<div
id=
"productDesc"
{{#if
limit
}}
class=
"limit"
{{/if}}
>
</div>
<div
class=
"bottom"
>
<div
class=
"bottom
iphonex-bottom-tab
"
>
{{#
ifcond
storage_sum
'&&'
activityIdDetail
.
currentTime
}}
<div
class=
"count-down"
>
<div
data-current=
"
{{
activityIdDetail
.
currentTime
}}
"
...
...
apps/activity/views/action/group/group-list.hbs
View file @
b98283b
...
...
@@ -25,7 +25,7 @@
</div>
</div>
<a
class=
"my-group my-group-handler"
href=
"/activity/group/order"
>
我的拼团
</a>
<a
class=
"my-group my-group-handler
iphonex-bottom-tab
"
href=
"/activity/group/order"
>
我的拼团
</a>
{{#if
shareInfo
}}
<div
class=
'my-share'
></div>
{{/if}}
...
...
apps/activity/views/action/yoluck/list.hbs
View file @
b98283b
...
...
@@ -52,7 +52,7 @@
</div>
<!-- 我的抽奖码 -->
<div
class=
"js-my-draw-code"
data-type=
3
>
我的抽奖码
</div>
<div
class=
"js-my-draw-code
iphonex-bottom-tab
"
data-type=
3
>
我的抽奖码
</div>
{{/
ifcond
}}
</div>
{{/
each
}}
...
...
apps/activity/views/partial/group/group-tabbar.hbs
View file @
b98283b
<div
class=
"group-tabbar"
>
<div
class=
"group-tabbar
iphonex-bottom-tab
"
>
{{#
each
items
}}
<div
class=
"group-tabbar-item"
>
{{#
ifcond
@index
'=='
..
/
active
}}
...
...
apps/activity/views/partial/yoluck-back/action-bar.hbs
View file @
b98283b
<div
class=
"action-bar-comp"
>
<div
class=
"action-bar"
>
<div
class=
"action-bar
iphonex-bottom-tab
"
>
<a
class=
"action-item action-list"
href=
"/activity/yoluck/index.html"
>
<div
class=
"action-image action-icon"
></div>
</a>
...
...
apps/activity/views/partial/yoluck/action-bar.hbs
View file @
b98283b
<div
class=
"action-bar-comp"
>
<div
class=
"action-bar"
>
<div
class=
"action-bar
iphonex-bottom-tab
"
>
<a
class=
"action-item action-list"
href=
"/activity/yoluck/index.html"
>
<div
class=
"action-image action-icon"
></div>
</a>
...
...
apps/mip/views/action/product/detail.hbs
View file @
b98283b
...
...
@@ -97,7 +97,7 @@
</div>
<div
id=
"shop-goods-container"
class=
"goods-container"
>
{{{
preference
}}}
</div>
<div
class=
"cart-bar-fixed"
>
<div
class=
"cart-bar"
>
<div
class=
"cart-bar
iphonex-bottom-tab
"
>
<a
href=
"//m.yohobuy.com/cart/index/index?union_type=100000000013130"
class=
"new-foot-ico"
rel=
"nofollow"
>
<div
class=
"cart-icon"
></div>
<div
class=
"tip"
>
购物车
</div>
...
...
apps/mip/views/partial/mip-shop-footer.hbs
View file @
b98283b
<div
class=
"shop-foot-wrapper"
>
<div
class=
"shop-foot-wrapper
iphonex-bottom-tab
"
>
<ul>
<li
data-bp-id=
"shop_footnav_one_1"
>
{{#if
category
.
url
}}
...
...
apps/product/views/action/detail/new/detail.hbs
View file @
b98283b
...
...
@@ -88,7 +88,7 @@
{{!--占位: 购物车部分--}}
<div
id=
"placeholder-infodata"
>
<div
class=
"cart-bar"
>
<div
class=
"cart-bar
iphonex-bottom-tab
"
>
<a
href=
"javascript:;"
class=
"new-foot-ico"
rel=
"nofollow"
>
<div
class=
"num-incart iconfont"
>
<span
class=
"num-tag
{{#
unless
@root
.
cartCount
}}
hide
{{/
unless
}}
"
>
{{
@root
.
cartCount
}}
</span>
...
...
apps/product/views/action/global/detail.hbs
View file @
b98283b
...
...
@@ -84,7 +84,7 @@
<div
id=
"productDesc"
class=
"product-desc"
></div>
<div
class=
"cart-bar"
>
<div
class=
"cart-bar
iphonex-bottom-tab
"
>
{{#
unless
@root
.
wap
.
common
.
removeCartCount
}}
<input
type=
"hidden"
id=
"remove-cart-count"
value=
"1"
>
{{/
unless
}}
...
...
apps/product/views/partial/reds-shop/footer.hbs
View file @
b98283b
<div
class=
"shop-foot-wrapper"
>
<div
class=
"shop-foot-wrapper
iphonex-bottom-tab
"
>
<ul>
<li
data-bp-id=
"shop_footnav_one_1"
>
{{#if
category
.
url
}}
...
...
apps/product/views/partial/shop/shop-footer.hbs
View file @
b98283b
<div
class=
"shop-foot-wrapper"
>
<div
class=
"shop-foot-wrapper
iphonex-bottom-tab
"
>
<ul
{{#if
brandList
}}
class=
"foot-list-3"
{{/if}}
>
<li
data-bp-id=
"shop_footnav_one_1"
class=
"buriedpoint"
>
{{#if
shopCategory
.
url
}}
...
...
doraemon/views/partial/footer-tab.hbs
View file @
b98283b
{{#
showFooterTab
}}
<div
class=
"footer-tab"
>
<div
class=
"footer-tab
iphonex-bottom-tab
"
>
<a
class=
"tab-item
{{#if
grilsHomePage
}}
current
{{/if}}{{#if
boysHomePage
}}
current
{{/if}}{{#if
kidsHomePage
}}
current
{{/if}}{{#if
lifestyleHomePage
}}
current
{{/if}}
"
href=
"
{{
indexUrl
}}
"
>
<p
class=
"iconfont tab-icon"
>

</p>
<p
class=
"tab-name"
>
首页
</p>
...
...
public/hbs/activity/group/chose-panel.hbs
View file @
b98283b
<div
class=
"chose-panel"
data-skn=
"
{{
productSkn
}}
"
>
<div
class=
"main"
>
<div
class=
"main
iphonex-bottom-tab
"
>
<div
class=
"close iconfont"
>

</div>
<div
class=
"infos"
>
<div
class=
"basic-info"
>
...
...
public/hbs/common/chose-panel-new.hbs
View file @
b98283b
{{#
cartInfo
}}
<div
class=
"chose-panel"
data-skn=
"
{{
productSkn
}}
"
>
<div
class=
"main"
>
<div
class=
"main
iphonex-bottom-tab
"
>
<div
class=
"close iconfont"
>

</div>
<div
class=
"infos
{{#if
@root
.
tickets
}}
tickets-info
{{/if}}
"
>
<div
class=
"basic-info"
>
...
...
public/hbs/common/chose-panel.hbs
View file @
b98283b
{{#
cartInfo
}}
<div
class=
"chose-panel"
data-skn=
"
{{
productSkn
}}
"
>
<div
class=
"main"
>
<div
class=
"main
iphonex-bottom-tab
"
>
<div
class=
"close iconfont"
>

</div>
<div
class=
"infos
{{#if
@root
.
tickets
}}
tickets-info
{{/if}}
"
>
<div
class=
"basic-info"
>
...
...
public/hbs/product/detail/infodata.hbs
View file @
b98283b
{{#
cartInfo
}}
<div
class=
"cart-bar
{{#if
storeGood
}}
store-good
{{/if}}
"
>
<div
class=
"cart-bar
{{#if
storeGood
}}
store-good
{{/if}}
iphonex-bottom-tab
"
>
{{#
unless
@root
.
wap
.
common
.
removeCartCount
}}
<input
type=
"hidden"
id=
"remove-cart-count"
value=
"1"
>
{{/
unless
}}
...
...
public/js/common.js
View file @
b98283b
...
...
@@ -11,6 +11,8 @@ let $footer = $('#yoho-footer'),
$header
=
$
(
'.yoho-header'
);
let
cleanHtml
=
require
(
'../../utils/cleanHtml'
);
const
yoho
=
require
(
'./yoho-app'
);
const
_
=
require
(
'lodash'
);
// 为您优选-40位随机数指纹请求id
let
RECID
=
(
new
Date
().
getTime
()
+
'_H5_YOHOBUY_'
+
Math
.
floor
(
Math
.
random
()
*
1000000
+
1000000
)
+
...
...
@@ -25,6 +27,44 @@ let _ChannelVary = {
require
(
'./common/share'
);
function
iPhoneXHandler
(
innerHeight
)
{
if
(
!
yoho
.
isiPhoneXSeries
)
{
return
false
;
}
let
currentInnerHeight
=
window
.
innerHeight
;
let
$yohoBody
=
$
(
'body'
);
if
(
yoho
.
isWechat
&&
window
.
history
.
length
===
1
)
{
$yohoBody
.
addClass
(
'iphonex-series'
);
}
else
{
if
(
innerHeight
<
currentInnerHeight
)
{
$yohoBody
.
addClass
(
'iphonex-series'
);
}
else
{
$yohoBody
.
removeClass
(
'iphonex-series'
);
}
}
}
// 根据机型的全局操作
(
function
()
{
let
innerHeight
=
window
.
innerHeight
;
if
(
yoho
.
isWechat
)
{
// 底部tab显示后获取高度
setTimeout
(
function
()
{
innerHeight
=
window
.
innerHeight
;
iPhoneXHandler
(
innerHeight
);
});
}
else
{
iPhoneXHandler
(
innerHeight
);
}
$
(
window
).
scroll
(
_
.
throttle
(()
=>
{
iPhoneXHandler
(
innerHeight
);
},
100
));
window
.
onresize
=
()
=>
{
iPhoneXHandler
(
innerHeight
);
};
}());
function
cookie
(
name
)
{
// var re = new RegExp(name + '=([^;$]*)', 'i'),
...
...
@@ -570,4 +610,5 @@ window.downLoadApp = downLoadApp;
window
.
mapSort
=
mapSort
;
require
(
'js/common/weixin-report'
);
...
...
public/js/yoho-app.js
View file @
b98283b
...
...
@@ -33,6 +33,40 @@ if (!$appLink.length) {
$
(
'body'
).
append
(
'<a id="yoho-app-link" href="javascript:;" style="display:none !important;"></a>'
);
$appLink
=
$
(
'#yoho-app-link'
);
}
const
isiPhoneXSeries
=
()
=>
{
console
.
log
(
navigator
.
userAgent
);
let
isiOS
=
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
navigator
.
userAgent
||
''
);
if
(
!
window
||
!
isiOS
)
{
return
false
;
}
const
xSeriesConfig
=
[{
// iPhone Xs(Max,Pro Max)
devicePixelRatio
:
3
,
width
:
414
,
height
:
896
,
},
{
// iPhone XR(11)
devicePixelRatio
:
2
,
width
:
414
,
height
:
896
,
},
{
// iPhone X(Xs,Pro)
devicePixelRatio
:
3
,
width
:
375
,
height
:
812
,
},
];
const
{
devicePixelRatio
,
screen
:
{
width
,
height
}
}
=
window
;
// eslint-disable-next-line max-len
return
xSeriesConfig
.
some
(
item
=>
item
.
devicePixelRatio
===
devicePixelRatio
&&
item
.
width
===
width
&&
item
.
height
===
height
);
};
yoho
=
{
/**
...
...
@@ -49,6 +83,7 @@ yoho = {
isiOS
:
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
navigator
.
userAgent
||
''
),
isAndroid
:
/Android/i
.
test
(
navigator
.
userAgent
||
''
),
isWechat
:
/micromessenger/i
.
test
(
navigator
.
userAgent
||
''
),
isiPhoneXSeries
:
isiPhoneXSeries
()
||
false
,
/**
* JS 与 APP 共享的对象
...
...
public/scss/activity/group/group-detail.scss
View file @
b98283b
...
...
@@ -631,7 +631,7 @@
}
.btn-wrap
{
position
:
fixed
;
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
...
...
public/scss/activity/group/group-progress.page.scss
View file @
b98283b
...
...
@@ -718,7 +718,7 @@
}
.btn-wrap
{
position
:
fixed
;
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
...
...
public/scss/activity/yoluck/action-bar.scss
View file @
b98283b
.action-bar-comp
{
.action-bar
{
display
:
flex
;
...
...
public/scss/cart/chose-panel.scss
View file @
b98283b
...
...
@@ -369,7 +369,7 @@
}
.btn-wrap
{
position
:
fixed
;
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
...
...
public/scss/layout/common.scss
View file @
b98283b
...
...
@@ -31,6 +31,30 @@ body {
}
}
.iphonex-bottom-tab
{
&
:after
{
content
:
""
;
display
:
block
;
height
:
35
PX
;
position
:
absolute
;
right
:
0
;
left
:
0
;
bottom
:
-35
PX
;
background-color
:
#fff
;
z-index
:
999
;
}
}
.iphonex-series
{
.yoho-footer
{
margin-bottom
:
93
PX
;
}
.iphonex-bottom-tab
{
bottom
:
34
PX
!
important
;
}
}
button
,
input
,
select
,
...
...
Please
register
or
login
to post a comment