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
沈志敏
8 years ago
Commit
83ab0ca3650c0170aad6914e48f6270cd59d7c65
1 parent
5743b50a
样式调整
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
42 deletions
apps/product/views/action/detail/detail.hbs
apps/product/views/action/detail/new/detail.hbs
public/hbs/product/detail/pricedata.hbs
public/js/product/new-detail.page.js
apps/product/views/action/detail/detail.hbs
View file @
83ab0ca
...
...
@@ -79,7 +79,7 @@
<ul
class=
"vip-level data-bind clearfix"
>
<li
class=
"icons-item"
>
<span
class=
"vip-img"
style=
"background-size:contain;"
>
<span
class=
"vip-img"
>
</span>
<span
class=
"vip-price"
></span>
</li>
...
...
apps/product/views/action/detail/new/detail.hbs
View file @
83ab0ca
...
...
@@ -54,16 +54,19 @@
</div>
{{/if}}
</div>
<div
id=
"pricedata"
></div>
{{!--占位: 学生价/会员价--}}
<div
id=
"placeholder-pricedata"
></div>
{{! 品牌优惠券}}
<div
class=
"brand-coupon hide"
>
<i
class=
"iconfont font-right pull-right"
>

</i>
<i
class=
"iconfont font-quan"
>

</i><span>
领取优惠券
</span>
</div>
{{!--占位: 促销--}}
<div
id=
"placeholder-promotion"
></div>
<div
id=
"placeholder-promotion"
style=
"height:100px;background-color:#fff;"
>
</div>
{{!-- 占位: 用户反馈, 店铺入口 --}}
<div
id=
"placeholder-feedback-store"
></div>
...
...
@@ -71,7 +74,8 @@
<div
id=
"productDesc"
class=
"product-desc
{{#if
limit
}}
limit
{{/if}}
"
></div>
{{>
detail
/
recommend-for-you
}}
<div
id=
"infodata"
>
{{!--占位: 购物车部分--}}
<div
id=
"placeholder-infodata"
>
<div
class=
"cart-bar"
>
<a
href=
"javascript:;"
class=
"num-incart iconfont"
>

</a>
<a
href=
"javascript:;"
class=
"addto-cart add-to-cart-url"
>
加入购物车
</a>
...
...
public/hbs/product/detail/pricedata.hbs
View file @
83ab0ca
...
...
@@ -4,11 +4,9 @@
<i
class=
"student-name"
>
学生价
</i><span
class=
"student-value"
>
¥
{{
studentPrice
}}
</span>
</div>
</div>
{{/if}}
{{#
vipLevel
}}
{{else
if
vipLevel
}}
<ul
class=
"vip-level clearfix"
>
{{#
each
list
}}
{{#
each
vipLevel
.
list
}}
<li
class=
"icons-item
{{#if
currentLevel
}}
current-level
{{/if}}
"
>
<span
class=
"vip-img"
>
</span>
...
...
@@ -16,4 +14,4 @@
</li>
{{/
each
}}
</ul>
{{/
vipLevel
}}
\ No newline at end of file
{{/if}}
\ No newline at end of file
...
...
public/js/product/new-detail.page.js
View file @
83ab0ca
var
$
=
require
(
'yoho-jquery'
),
Swiper
=
require
(
'yoho-swiper'
),
tip
=
require
(
'../plugin/tip'
),
dialog
=
require
(
'../plugin/dialog'
);
// 顶部swiper
new
Swiper
(
'.banner-swiper'
,
{
preloadImages
:
false
,
lazyLoading
:
true
,
lazyLoadingInPrevNext
:
true
,
lazyLoadingOnTransitionStart
:
true
,
paginationClickable
:
true
,
pagination
:
'.banner-top .pagination-inner'
,
nextButton
:
'.my-swiper-button-next'
,
prevButton
:
'.my-swiper-button-prev'
,
spaceBetween
:
3
});
var
$
=
require
(
'yoho-jquery'
);
var
productId
=
$
(
'#productId'
).
val
();
var
goodsId
=
$
(
'#goodsId'
).
val
();
var
productSkn
=
$
(
'#productSkn'
).
val
();
var
brandId
=
$
(
'#brand-id'
).
val
();
require
(
'../common'
);
setTimeout
(()
=>
{
var
Swiper
=
require
(
'yoho-swiper'
);
// 顶部swiper
new
Swiper
(
'.banner-swiper'
,
{
preloadImages
:
false
,
lazyLoading
:
true
,
lazyLoadingInPrevNext
:
true
,
lazyLoadingOnTransitionStart
:
true
,
paginationClickable
:
true
,
pagination
:
'.banner-top .pagination-inner'
,
nextButton
:
'.my-swiper-button-next'
,
prevButton
:
'.my-swiper-button-prev'
,
spaceBetween
:
3
});
require
(
'../common'
);
// 领券
require
(
'./detail/brand-coupon'
);
// 页面底部异步加载的部分
require
(
'./detail/desc'
);
// 喂你优选
require
(
'./detail/recommend-for-you-product-desc'
);
},
100
);
// 动态加载数据
(
function
()
{
...
...
@@ -53,11 +63,12 @@ require('../common');
}
}
$
(
'#pricedata'
).
replaceWith
(
priceDataHbs
(
data
));
$
(
'#infodata'
).
replaceWith
(
infoDataHbs
(
data
));
$
(
'#placeholder-pricedata'
).
replaceWith
(
priceDataHbs
(
data
));
$
(
'#placeholder-infodata'
).
replaceWith
(
infoDataHbs
(
data
));
if
(
data
.
isDepositAdvance
===
'Y'
)
{
// 定金预售商品
var
tip
=
require
(
'../plugin/tip'
);
setTimeout
(
function
()
{
$
(
'#addtoCart'
).
text
(
'立即购买'
).
off
(
'touchstart'
).
on
(
'touchstart'
,
function
()
{
tip
.
show
(
'定金预售商品只能在APP端购买'
);
...
...
@@ -113,9 +124,11 @@ require('../common');
}
else
{
$cartBar
=
$
(
'.cart-bar'
);
}
},
2
00
);
},
5
00
);
// 限购
var
dialog
=
require
(
'../plugin/dialog'
);
$
(
'#limit-sale'
).
on
(
'touchend'
,
function
(
e
)
{
var
loginUrl
=
$
(
'#loginUrl'
).
val
(),
time
,
...
...
@@ -160,7 +173,7 @@ require('../common');
});
}
});
},
50
);
},
1
50
);
}
}());
...
...
@@ -260,12 +273,3 @@ require('../common');
});
},
200
);
}(
productSkn
,
productId
,
brandId
));
// 领券
require
(
'./detail/brand-coupon'
);
// 页面底部异步加载的部分
require
(
'./detail/desc'
);
// 喂你优选
require
(
'./detail/recommend-for-you-product-desc'
);
...
...
Please
register
or
login
to post a comment