Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
徐炜
9 years ago
Commit
e8a667ee5709dc75b67c92c327095db84c8d4fed
2 parents
c3cc63ed
3d90bb26
master
...
develop
feature/catch
feature/docker
feature/login-msg
feature/login-ua-ip
feature/removCamel
feature/safe-bug
feature/sessionKey
feature/setting
feature/vip
feature/webpack2
feature/wsl5.3
gray
release/2.0
release/fontBack2.0
Merge remote-tracking branch 'origin/feature/https'
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
951 additions
and
949 deletions
apps/brand/controllers/brand.js
apps/brand/views/action/index.hbs
apps/channel/views/partial/ad-banner.hbs
apps/channel/views/partial/ad.hbs
apps/channel/views/partial/brand-img-box.hbs
apps/channel/views/partial/brand-text-box.hbs
apps/channel/views/partial/editorial.hbs
apps/channel/views/partial/new-arrival.hbs
apps/channel/views/partial/slider.hbs
apps/editorial/controllers/editorial.js
apps/editorial/views/action/detail.hbs
apps/editorial/views/partial/related-goods.hbs
apps/me/controllers/favorite.js
apps/me/views/action/index.hbs
apps/me/views/partial/collection/product.hbs
apps/me/views/partial/exchange-detail.hbs
apps/me/views/partial/order/detail/order-status.hbs
apps/me/views/partial/order/good-info.hbs
apps/me/views/partial/order/goods-box.hbs
apps/me/views/partial/order/table-body.hbs
apps/me/views/partial/refund-detail.hbs
apps/me/views/partial/refund.hbs
apps/me/views/partial/returns-list.hbs
apps/partial/controllers/index.js
apps/passport/controllers/bind.js
apps/passport/models/back-api.js
apps/passport/models/user-service.js
apps/passport/views/action/back/send-email.hbs
apps/passport/views/action/bind/bind-confirm.hbs
apps/passport/views/action/bind/bind-done.hbs
apps/passport/views/action/bind/bind-success.hbs
apps/passport/views/action/bind/relate-confirm.hbs
apps/passport/views/action/bind/relate-success.hbs
apps/passport/views/action/login/index.hbs
apps/passport/views/partial/reg/register.hbs
apps/product/controllers/query.js
apps/product/models/search.js
apps/product/views/action/newList.hbs
apps/product/views/action/shop-index.hbs
apps/product/views/partial/brand-banner.hbs
apps/product/views/partial/list/goods-box.hbs
apps/product/views/partial/list/shop-menu.hbs
apps/shopping/modules/bank.js
apps/shopping/views/action/order.hbs
apps/shopping/views/action/pay-success.hbs
config/common.js
doraemon/models/header.js
doraemon/views/error/404.hbs
doraemon/views/error/500.hbs
doraemon/views/partial/footer.hbs
doraemon/views/partial/goods.hbs
doraemon/views/partial/nav-menu.hbs
doraemon/views/partial/path-nav.hbs
doraemon/views/partial/settle-header.hbs
doraemon/views/partial/sign-header.hbs
public/js/editorial/detail.page.js
public/js/me/exchange.page.js
apps/brand/controllers/brand.js
View file @
e8a667e
...
...
@@ -22,19 +22,19 @@ const index = (req, res, next) => {
if
(
channel
===
'women'
)
{
contentCode
=
'527079e6c46d0f125eb46b835968971b'
;
name
=
'WOMEN首页'
;
link
=
'
http:
//www.yohoblk.com/women'
;
link
=
'//www.yohoblk.com/women'
;
channel
=
302
;
gender
=
'2,3'
;
}
else
if
(
channel
===
'lifestyle'
)
{
contentCode
=
'94b5ed607b6d565ffc29c2c04be121dc'
;
name
=
'LIFT STYLE首页'
;
link
=
'
http:
//www.yohoblk.com/lifestyle'
;
link
=
'//www.yohoblk.com/lifestyle'
;
channel
=
303
;
gender
=
'1,2,3'
;
}
else
{
contentCode
=
'81886aaa5e82e3741bc1ba1e04ec7706'
;
name
=
'MEN首页'
;
link
=
'
http:
//www.yohoblk.com'
;
link
=
'//www.yohoblk.com'
;
channel
=
301
;
gender
=
'1,3'
;
}
...
...
apps/brand/views/action/index.hbs
View file @
e8a667e
...
...
@@ -6,7 +6,7 @@
<ul
class=
"clearfix"
>
{{#
each
tabs
}}
<li>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<div
class=
"g-mask"
></div>
<p
class=
"tips"
>
{{
name
}}
</p>
<img
class=
"lazy"
data-original=
"
{{
image
src
370
304
1
}}
"
/>
...
...
@@ -20,7 +20,7 @@
<div
class=
"category-nav"
>
{{#
each
category
}}
<a
href=
"#
{{
key
}}
"
class=
"
{{
key
}}
"
>
{{
key
}}
</a>
{{/
each
}}
{{/
each
}}
</div>
</div>
...
...
@@ -29,4 +29,4 @@
</div>
{{/
brand
}}
</div>
\ No newline at end of file
</div>
...
...
apps/channel/views/partial/ad-banner.hbs
View file @
e8a667e
<div
class=
"ad-banner"
>
{{#
adBanner
}}
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
src
1150
163
}}
"
title=
"
{{
title
}}
"
alt=
"
{{
alt
}}
"
>
</a>
{{/
adBanner
}}
...
...
apps/channel/views/partial/ad.hbs
View file @
e8a667e
<div
class=
"ad-container clearfix"
>
{{#
brandsAd
}}
<div
class=
"ad
{{#if
@first
}}
first
{{/if}}
"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
src
298
298
}}
"
alt=
""
>
</a>
{{>
brand-text-box
}}
...
...
apps/channel/views/partial/brand-img-box.hbs
View file @
e8a667e
{{#
classicBrands
}}
<div
class=
"brand-img-box
{{#if
right
}}
right
{{/if}}
{{#if
bottomSpace
}}
mb10
{{/if}}
"
>
{{#
big
}}
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"big-img"
src=
"
{{
image
src
565
340
}}
"
>
</a>
{{/
big
}}
{{#
small
}}
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"small-img
{{#if
@first
}}
first
{{/if}}
"
src=
"
{{
image
src
281
285
}}
"
>
</a>
{{/
small
}}
...
...
apps/channel/views/partial/brand-text-box.hbs
View file @
e8a667e
<div
class=
"brand-text-box"
>
<h4>
{{
productName
}}
</h4>
<p>
{{
productDesc
}}
</p>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<button>
{{
btnText
}}
</button>
</a>
</div>
...
...
apps/channel/views/partial/editorial.hbs
View file @
e8a667e
...
...
@@ -5,7 +5,7 @@
<div
class=
"news left"
>
{{#
big
}}
<span
class=
"box"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
src
395
495
}}
"
alt=
"
{{
alt
}}
"
>
</a>
<div
class=
"editorial-title"
><div><p>
{{
title
}}
</p></div></div>
...
...
@@ -15,7 +15,7 @@
<div
class=
"news right"
>
{{#
small
}}
<span
class=
"box
{{#if
bottomSpace
}}
bottom-space
{{/if}}
{{#if
rightSpace
}}
right-space
{{/if}}
"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
src
360
240
}}
"
alt=
"
{{
alt
}}
"
>
</a>
<div
class=
"editorial-title"
><div><p>
{{
title
}}
</p></div></div>
...
...
apps/channel/views/partial/new-arrival.hbs
View file @
e8a667e
...
...
@@ -4,21 +4,21 @@
{{#
newArrivals
}}
<div
class=
"arrival-item
{{#if
smallImg
}}
small-img
{{/if}}
{{#if
@last
}}
last
{{^}}
normal
{{/if}}
"
>
{{#if
even
}}
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{#if
smallImg
}}{{
image
src
218
490
}}{{^}}{{
image
src
327
490
}}{{/if}}
"
alt=
"
{{
alt
}}
"
>
</a>
<div
class=
"brand-name"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<span
class=
"bottom"
>
{{
title
}}
</span>
</a>
</div>
{{^}}
<div
class=
"brand-name"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<span
class=
"top"
>
{{
title
}}
</span>
</a>
</div>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy-img"
data-original=
"
{{#if
smallImg
}}{{
image
src
218
490
}}{{^}}{{
image
src
327
490
}}{{/if}}
"
alt=
"
{{
alt
}}
"
>
</a>
{{/if}}
...
...
apps/channel/views/partial/slider.hbs
View file @
e8a667e
...
...
@@ -3,7 +3,7 @@
<ul>
{{#
slider
}}
<li
class=
"banner-item"
style=
"
{{#if
bgColor
}}
background-color:
{{
bgColor
}}{{/if}}
; background-image:url('
{{
image
src
1150
570
}}
')"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
></a>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
></a>
{{#
tips
}}
<div
class=
"slide-tips"
>
<div
class=
"g-mark"
></div>
...
...
@@ -20,7 +20,7 @@
<ul
class=
"clearfix"
>
{{#
pagination
}}
<li>
<a
href=
"
{{
url
}}
"
target=
"_blank"
></a>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
></a>
<img
src=
"
{{
image
src
138
54
}}
"
alt=
""
>
</li>
{{/
pagination
}}
...
...
apps/editorial/controllers/editorial.js
View file @
e8a667e
...
...
@@ -29,15 +29,15 @@ const index = (req, res, next) => {
if
(
channel
===
'men'
)
{
gender
=
'1,3'
;
name
=
'MEN首页'
;
link
=
'
http:
//www.yohoblk.com'
;
link
=
'//www.yohoblk.com'
;
}
else
if
(
channel
===
'women'
)
{
gender
=
'2,3'
;
name
=
'WOMEN首页'
;
link
=
'
http:
//www.yohoblk.com/women'
;
link
=
'//www.yohoblk.com/women'
;
}
else
{
gender
=
'3,3'
;
name
=
'LIFESTYLE首页'
;
link
=
'
http:
//www.yohoblk.com/lifestyle'
;
link
=
'//www.yohoblk.com/lifestyle'
;
}
editorialModel
.
getIndexData
(
pageNum
,
limit
,
appType
,
udid
,
gender
).
then
((
result
)
=>
{
...
...
@@ -95,15 +95,15 @@ const list = (req, res) => {
if
(
channel
===
'men'
)
{
gender
=
'1,3'
;
name
=
'MEN首页'
;
link
=
'
http:
//www.yohoblk.com'
;
link
=
'//www.yohoblk.com'
;
}
else
if
(
channel
===
'women'
)
{
gender
=
'2,3'
;
name
=
'WOMEN首页'
;
link
=
'
http:
//www.yohoblk.com/women'
;
link
=
'//www.yohoblk.com/women'
;
}
else
{
gender
=
'3,3'
;
name
=
'LIFESTYLE首页'
;
link
=
'
http:
//www.yohoblk.com/lifestyle'
;
link
=
'//www.yohoblk.com/lifestyle'
;
}
if
(
tag
)
{
...
...
@@ -126,7 +126,7 @@ const list = (req, res) => {
name
:
name
},
{
link
:
'
http:
//www.yohoblk.com/editorial'
,
link
:
'//www.yohoblk.com/editorial'
,
pathTitle
:
'资讯'
,
name
:
'Editorial资讯'
},
...
...
@@ -138,7 +138,7 @@ const list = (req, res) => {
pathTitle
:
req
.
query
.
query
||
result
.
authorName
,
msg
:
result
.
tabs
,
paginationOpts
:
{
page
:
pageNum
,
// current page:
http:
//host/?page=2
page
:
pageNum
,
// current page: //host/?page=2
limit
:
20
,
// per_page records' number
total
:
result
.
total
,
// total page number
queryParams
:
req
.
query
...
...
@@ -171,15 +171,15 @@ const detail = (req, res, next) => {
if
(
channel
===
'men'
)
{
name
=
'MEN首页'
;
link
=
'
http:
//www.yohoblk.com'
;
link
=
'//www.yohoblk.com'
;
gender
=
'1,3'
;
}
else
if
(
channel
===
'women'
)
{
name
=
'WOMEN首页'
;
link
=
'
http:
//www.yohoblk.com/women'
;
link
=
'//www.yohoblk.com/women'
;
gender
=
'2,3'
;
}
else
{
name
=
'LIFESTYLE首页'
;
link
=
'
http:
//www.yohoblk.com/lifestyle'
;
link
=
'//www.yohoblk.com/lifestyle'
;
gender
=
'3,3'
;
}
...
...
@@ -196,7 +196,7 @@ const detail = (req, res, next) => {
name
:
name
},
{
link
:
'
http:
//www.yohoblk.com/editorial'
,
link
:
'//www.yohoblk.com/editorial'
,
pathTitle
:
'资讯'
,
name
:
'Editorial资讯'
},
...
...
apps/editorial/views/action/detail.hbs
View file @
e8a667e
...
...
@@ -9,13 +9,13 @@
<div
class=
"article-info"
>
<div
class=
"article-author"
>
<div
class=
"author-avatar"
>
<a
href=
"
{{
authorUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
authorUrl
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
avatar
}}
"
>
</a>
</div>
</div>
<div
class=
"author-info"
>
<a
class=
"author-name"
href=
"
{{
authorUrl
}}
"
>
{{
name
}}
</a>
<a
class=
"author-name"
href=
"
{{
https
authorUrl
}}
"
>
{{
name
}}
</a>
</div>
<div
class=
"article-status"
>
<span
class=
"article-time brown-light"
>
{{
time
}}
</span>
...
...
@@ -105,7 +105,7 @@
<div
class=
"brands"
>
{{#
brands
}}
<div
class=
"brand"
>
<a
class=
"thumb"
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
class=
"thumb"
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
src=
"
{{
image
thumb
100
100
2
}}
"
>
</a>
<p
class=
"brand-name"
>
{{
name
}}
</p>
...
...
@@ -144,7 +144,7 @@
<ul
id=
"tags"
>
{{#
tags
}}
<li>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
{{
name
}}
</a>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
name
}}
</a>
</li>
{{/
tags
}}
</ul>
...
...
@@ -155,7 +155,7 @@
<p
class=
"chapter-right"
>
<span>
下一篇
</span><br>
{{#
nextArticle
}}
<a
href=
"
{{
href
}}
"
>
{{
nextChapter
}}
</a>
<a
href=
"
{{
h
ttps
h
ref
}}
"
>
{{
nextChapter
}}
</a>
{{/
nextArticle
}}
</p>
...
...
@@ -163,7 +163,7 @@
<p
class=
"chapter-left"
>
<span>
上一篇
</span><br>
{{#
perArticle
}}
<a
href=
"
{{
href
}}
"
>
{{
lastChapter
}}
</a>
<a
href=
"
{{
h
ttps
h
ref
}}
"
>
{{
lastChapter
}}
</a>
{{/
perArticle
}}
</p>
...
...
apps/editorial/views/partial/related-goods.hbs
View file @
e8a667e
<div
class=
"good-info"
data-skn=
"
{{
skn
}}
"
>
<a
href=
"
{{
link
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
link
}}
"
target=
"_blank"
>
<img
class=
"thumb"
src=
"
{{
image
src
219
295
}}
"
>
</a>
<div
class=
"desc"
>
<a
class=
"name"
href=
"
{{
link
}}
"
target=
"_blank"
>
{{
name
}}
</a>
<a
class=
"name"
href=
"
{{
https
link
}}
"
target=
"_blank"
>
{{
name
}}
</a>
<p
class=
"price"
>
¥
{{
price
}}
</p>
</div>
</div>
\ No newline at end of file
</div>
...
...
apps/me/controllers/favorite.js
View file @
e8a667e
...
...
@@ -27,7 +27,7 @@ const favorite = {
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'我的收藏'
),
navigation
:
mcHandler
.
getSideMenu
(
'我的收藏'
),
banner
:
'
http:
//placehold.it/150x120'
,
banner
:
'//placehold.it/150x120'
,
collection
:
true
,
favorite
:
{
product
:
true
,
...
...
@@ -108,7 +108,7 @@ const favorite = {
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'我的收藏'
),
navigation
:
mcHandler
.
getSideMenu
(
'我的收藏'
),
banner
:
'
http:
//placehold.it/150x120'
,
banner
:
'//placehold.it/150x120'
,
collection
:
true
,
favorite
:
{
brand
:
true
,
...
...
@@ -178,7 +178,7 @@ const favorite = {
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'我的收藏'
),
navigation
:
mcHandler
.
getSideMenu
(
'我的收藏'
),
banner
:
'
http:
//placehold.it/150x120'
,
banner
:
'//placehold.it/150x120'
,
collection
:
true
,
favorite
:
{
editorial
:
true
,
...
...
apps/me/views/action/index.hbs
View file @
e8a667e
...
...
@@ -10,13 +10,13 @@
<ul
class=
"nav"
>
{{#
each
navigation
}}
<li
class=
"nav-row
{{#if
focus
}}
focus
{{/if}}
"
>
<a
href=
"
{{
link
}}
"
>
{{
name
}}
</a>
<a
href=
"
{{
https
link
}}
"
>
{{
name
}}
</a>
</li>
{{/
each
}}
</ul>
{{#
banner
}}
{{#if
banner
}}
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"banner-img"
data-original=
"
{{
image
banner
150
120
}}
"
>
</a>
{{/if}}
...
...
apps/me/views/partial/collection/product.hbs
View file @
e8a667e
...
...
@@ -26,15 +26,15 @@
{{/
stateText
}}
</div>
<div
class=
"desc"
>
<div
class=
"brand-name"
><a
href=
"
{{
url
}}
"
target=
"_blank"
>
{{
brandName
}}
</a></div>
<div
class=
"product-name"
><a
href=
"
{{
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a></div>
<div
class=
"brand-name"
><a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
brandName
}}
</a></div>
<div
class=
"product-name"
><a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a></div>
<p
class=
"price"
>
¥
{{
round
salesPrice
2
}}
</p>
</div>
<div
class=
"tool-area clearfix"
>
{{#if
hideBtn
}}
{{^}}
<a
class=
"btn white"
href=
"
{{
url
}}
"
target=
"_blank"
>
立即购买
</a>
<a
class=
"btn white"
href=
"
{{
https
url
}}
"
target=
"_blank"
>
立即购买
</a>
{{/if}}
<span
class=
"btn white cancel"
>
取消收藏
</span>
</div>
...
...
@@ -58,7 +58,7 @@
</div>
{{^}}
<div
class=
"favorite-empty"
>
<p>
您还没有收藏的商品, 去
<a
href=
"
{{
siteUrl
}}
"
>
首页
</a>
看看吧
</p>
<p>
您还没有收藏的商品, 去
<a
href=
"
{{
https
siteUrl
}}
"
>
首页
</a>
看看吧
</p>
</div>
{{/if}}
{{/
data
}}
...
...
apps/me/views/partial/exchange-detail.hbs
View file @
e8a667e
...
...
@@ -56,7 +56,7 @@
{{#if
auditSuccess
}}
<div
class=
"order"
>
<a
href=
"
{{
view
}}
"
target=
"_blank"
><span
class=
"check"
>
查看
</span></a>
<a
href=
"
{{
https
view
}}
"
target=
"_blank"
><span
class=
"check"
>
查看
</span></a>
<span
class=
"exchange-order"
>
换货订单
</span>
</div>
{{/if}}
...
...
@@ -115,9 +115,9 @@
<p
class=
"address-title"
>
收货地址
</p>
<div
class=
"address-detail"
>
<p>
所在区域:
{{
city
}}{{
county
}}
</p>
<p>
收
&
nbsp货
&
nbsp人:
{{
consigneeName
}}
</p>
<p>
详细地址:
{{
address
}}
</p>
<p>
联系电话:
{{
mobile
}}
</p>
<p>
收
&
nbsp货
&
nbsp人:
{{
consigneeName
}}
</p>
<p>
详细地址:
{{
address
}}
</p>
<p>
联系电话:
{{
mobile
}}
</p>
</div>
</div>
{{/if}}
...
...
apps/me/views/partial/order/detail/order-status.hbs
View file @
e8a667e
...
...
@@ -7,7 +7,7 @@
{{#
btns
}}
<li>
{{#if
isPayBtn
}}
<a
href=
"
{{
payUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
payUrl
}}
"
target=
"_blank"
>
<span
class=
"
{{
classStr
}}
"
>
{{
name
}}
</span>
</a>
{{^}}
...
...
apps/me/views/partial/order/good-info.hbs
View file @
e8a667e
<div
class=
"good-info
{{#if
@last
}}
last
{{/if}}
"
>
<a
href=
"
{{
goodUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
goodUrl
}}
"
target=
"_blank"
>
<img
src=
"
{{
image
goodsImage
65
90
}}
"
>
</a>
<div
class=
"detail"
>
<a
href=
"
{{
goodUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
goodUrl
}}
"
target=
"_blank"
>
<p
class=
"with-bottom-space good-name-text"
>
{{
productName
}}
</p>
</a>
<span
class=
"with-space"
>
颜色:
{{
colorName
}}
</span>
...
...
apps/me/views/partial/order/goods-box.hbs
View file @
e8a667e
...
...
@@ -6,7 +6,7 @@
<p
class=
"
{{#if
@last
}}
last
{{/if}}
"
>
¥
{{
goodsPrice
}}
{{#if
changed
}}
<a
href=
"
{{
returnUrl
}}
"
>
<a
href=
"
{{
https
returnUrl
}}
"
>
<span
class=
"btn white change-tag"
>
已退换
</span>
</a>
{{/if}}
...
...
apps/me/views/partial/order/table-body.hbs
View file @
e8a667e
...
...
@@ -14,7 +14,7 @@
</div>
<div
class=
"common-column special-border status"
>
<p
class=
"bold status-str"
>
{{
statusStr
}}
</p>
<a
href=
"
{{
detailUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
detailUrl
}}
"
target=
"_blank"
>
<p
class=
"subtext check-detail"
>
查看详情
</p>
</a>
</div>
...
...
@@ -25,7 +25,7 @@
{{#if
showLeftTime
}}
<span
class=
"iconfont hide-when-invalid"
>

</span><p
class=
"left-time"
data-left=
"
{{
payLefttime
}}
"
></p>
{{/if}}
<a
href=
"
{{
payUrl
}}
"
>
<a
href=
"
{{
https
payUrl
}}
"
>
<span
class=
"btn red hide-when-invalid "
>
立即付款
</span>
</a>
{{/if}}
...
...
@@ -33,10 +33,10 @@
</div>
{{/if}}
{{#if
showEditOption
}}
<a
href=
"
{{
refundUrl
}}
"
class=
"
{{#if
hideChange
}}
disable
{{/if}}
"
>
<a
href=
"
{{
https
refundUrl
}}
"
class=
"
{{#if
hideChange
}}
disable
{{/if}}
"
>
<p
class=
"subtext"
>
申请退货
</p>
</a>
<a
href=
"
{{
exchangeUrl
}}
"
class=
"
{{#if
hideChange
}}
disable
{{/if}}
"
>
<a
href=
"
{{
https
exchangeUrl
}}
"
class=
"
{{#if
hideChange
}}
disable
{{/if}}
"
>
<p
class=
"subtext"
>
申请换货
</p>
</a>
<p
class=
"subtext delete"
>
删除订单
</p>
...
...
@@ -66,7 +66,7 @@
{{#if
showEmptyEn
}}
<p
class=
"msg-en"
>
You do not have an order for the time being
</p>
{{/if}}
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
https
url
}}
"
>
<span
class=
"btn"
>
{{
btnText
}}
</span>
</a>
</div>
...
...
apps/me/views/partial/refund-detail.hbs
View file @
e8a667e
...
...
@@ -140,7 +140,7 @@
<dd>
<label>
照片凭证:
</label>
{{#
evidence
}}
<a
href=
"
{{
this
}}
"
class=
"evidence-img"
target=
"_blank"
>
<a
href=
"
{{
https
this
}}
"
class=
"evidence-img"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
this
}}
"
>
</a>
{{/
evidence
}}
...
...
@@ -152,4 +152,4 @@
{{/
goods
}}
</div>
</div>
{{/
refundDetail
}}
\ No newline at end of file
{{/
refundDetail
}}
...
...
apps/me/views/partial/refund.hbs
View file @
e8a667e
...
...
@@ -17,12 +17,12 @@
<div
class=
"goods-item clearfix"
>
<div
class=
"check"
data-skn=
"
{{
skn
}}
"
data-skc=
"
{{
skc
}}
"
data-sku=
"
{{
sku
}}
"
data-price=
"
{{
price
}}
"
data-type=
"
{{
typeId
}}
"
>
{{>
icon
/
checkbox
}}
</div>
<div
class=
"img"
>
<a
href=
"
{{
href
}}
"
title=
"
{{
name
}}
"
target=
"_blank"
>
<a
href=
"
{{
h
ttps
h
ref
}}
"
title=
"
{{
name
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
image
img
70
90
}}
"
>
</a>
</div>
<div
class=
"info"
>
<p><a
href=
"
{{
href
}}
"
class=
"title"
title=
"
{{
name
}}
"
target=
"_blank"
>
{{
name
}}
</a></p>
<p><a
href=
"
{{
h
ttps
h
ref
}}
"
class=
"title"
title=
"
{{
name
}}
"
target=
"_blank"
>
{{
name
}}
</a></p>
<p>
颜色:
{{
color
}}
尺码:
{{
size
}}
</p>
<p>
×
{{
num
}}
</p>
</div>
...
...
apps/me/views/partial/returns-list.hbs
View file @
e8a667e
...
...
@@ -25,7 +25,7 @@
<p
class=
"subtext cancel-apply"
data-type=
"
{{
type
}}
"
data-apply-id=
"
{{
id
}}
"
>
取消申请
</p>
{{/
..
/
this
}}
{{/
isY
}}
<a
href=
"
{{
detailUrl
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
detailUrl
}}
"
target=
"_blank"
>
<p
class=
"subtext check-detail"
>
查看详情
</p>
</a>
</div>
...
...
apps/partial/controllers/index.js
View file @
e8a667e
...
...
@@ -39,7 +39,7 @@ const index = (req, res) => {
queryParams
:
req
.
query
},
goods
:
{
img
:
'
http:
//placehold.it/274x366'
,
img
:
'//placehold.it/274x366'
,
link
:
''
,
name
:
'Fred Perry Bomber jacket'
,
price
:
'1015.00'
...
...
apps/passport/controllers/bind.js
View file @
e8a667e
...
...
@@ -20,7 +20,7 @@ const Sources = {
wechat
:
'微信'
};
const
DEFAULT_URL
=
'
http:
//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'
;
const
DEFAULT_URL
=
'//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'
;
/**
* 首页
...
...
apps/passport/models/back-api.js
View file @
e8a667e
...
...
@@ -5,7 +5,7 @@
'use strict'
;
const
api
=
global
.
yoho
.
API
;
const
YOHOBUY_URL
=
'
http:
//www.yohobuy.com/'
;
const
YOHOBUY_URL
=
'//www.yohobuy.com/'
;
/**
* 获取地区数据
...
...
apps/passport/models/user-service.js
View file @
e8a667e
...
...
@@ -6,7 +6,7 @@
const
api
=
require
(
'./user-api'
);
const
helpers
=
global
.
yoho
.
helpers
;
const
DEFAULT_HEAD_IMG_ICO
=
'
http:
//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'
;
const
DEFAULT_HEAD_IMG_ICO
=
'//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'
;
/**
* 第三方登录 根据手机号获取用户相关信息
...
...
apps/passport/views/action/back/send-email.hbs
View file @
e8a667e
...
...
@@ -59,7 +59,7 @@
<li
class=
"clearfix"
>
<div>
<a
class=
"btn to-my-email"
href=
"
{{
email
}}
"
target=
"_blank"
class=
"btn_b_ar_r"
>
去我的邮箱
</a>
<a
class=
"btn to-my-email"
href=
"
{{
https
email
}}
"
target=
"_blank"
class=
"btn_b_ar_r"
>
去我的邮箱
</a>
</div>
</li>
</ul>
...
...
apps/passport/views/action/bind/bind-confirm.hbs
View file @
e8a667e
...
...
@@ -9,7 +9,7 @@
<img
id=
"avatar"
class=
"avatar"
src=
"
{{
avatar
}}
"
>
{{^}}
<img
id=
"avatar"
class=
"avatar"
src=
"
http:
//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
src=
"//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
{{/if}}
</div>
</li>
...
...
@@ -44,8 +44,8 @@
<li>
<div
class=
"quick-link"
>
<a
class=
"blue left"
href=
"
{{
bindUrl
}}
"
>
绑定其他手机号
</a>
<a
class=
"blue right"
href=
"
{{
loginUrl
}}
"
>
使用手机号登录
</a>
<a
class=
"blue left"
href=
"
{{
https
bindUrl
}}
"
>
绑定其他手机号
</a>
<a
class=
"blue right"
href=
"
{{
https
loginUrl
}}
"
>
使用手机号登录
</a>
</div>
</li>
</ul>
...
...
apps/passport/views/action/bind/bind-done.hbs
View file @
e8a667e
...
...
@@ -9,7 +9,7 @@
<img
id=
"avatar"
class=
"avatar"
src=
"
{{
avatar
}}
"
>
{{^}}
<img
id=
"avatar"
class=
"avatar"
src=
"
http:
//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
src=
"//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
{{/if}}
</div>
</li>
...
...
@@ -38,16 +38,16 @@
<li>
<div>
<a
id=
"next"
class=
"btn btn-fixed-height"
href=
"
{{
bindUrl
}}
"
>
绑定其他手机号
</a>
<a
id=
"next"
class=
"btn btn-fixed-height"
href=
"
{{
https
bindUrl
}}
"
>
绑定其他手机号
</a>
</div>
</li>
<li>
<div
class=
"quick-link center"
>
<a
class=
"blue"
href=
"
{{
loginUrl
}}
"
>
使用手机号登录
</a>
<a
class=
"blue"
href=
"
{{
https
loginUrl
}}
"
>
使用手机号登录
</a>
</div>
</li>
</ul>
</div>
</div>
\ No newline at end of file
</div>
...
...
apps/passport/views/action/bind/bind-success.hbs
View file @
e8a667e
...
...
@@ -17,10 +17,10 @@
<li>
<div>
<a
class=
"btn btn-fixed-height"
href=
"
{{
goShopping
}}
"
>
开始购物
</a>
<a
class=
"btn btn-fixed-height"
href=
"
{{
https
goShopping
}}
"
>
开始购物
</a>
</div>
</li>
</ul>
</div>
</div>
\ No newline at end of file
</div>
...
...
apps/passport/views/action/bind/relate-confirm.hbs
View file @
e8a667e
...
...
@@ -5,7 +5,7 @@
<li
class=
"clearfix big-width"
>
<div
id=
"avatar"
class=
"center"
>
<img
class=
"avatar"
src=
"
http:
//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
src=
"//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100"
>
</div>
</li>
<li>
...
...
@@ -20,7 +20,7 @@
<li
class=
"clearfix"
>
<div
id=
"confirmInfo"
class=
"confirmInfo"
>
<div
class=
"desc center"
>
手机号
{{
mobile
}}
已经被以上用户注册,点击
<a
class=
"blue underline"
href=
"
{{
signinUrl
}}
"
>
登录该帐号
</a>
<div
class=
"desc center"
>
手机号
{{
mobile
}}
已经被以上用户注册,点击
<a
class=
"blue underline"
href=
"
{{
https
signinUrl
}}
"
>
登录该帐号
</a>
</div>
<div
class=
"desc"
></div>
<div
class=
"desc center"
>
您可以使用此号码进行帐户关联或者更换一个新的手机号码
</div>
...
...
@@ -34,7 +34,7 @@
<li>
<div
class=
"quick-btn"
>
<a
id=
"relate-btn"
class=
"btn btn-fixed-height left"
>
关联此手机号
</a>
<a
class=
"btn btn-fixed-height right"
href=
"
{{
relateUrl
}}
"
>
更换新手机号
</a>
<a
class=
"btn btn-fixed-height right"
href=
"
{{
https
relateUrl
}}
"
>
更换新手机号
</a>
</div>
</li>
...
...
@@ -51,4 +51,4 @@
<input
id=
"area"
type=
"hidden"
value=
"
{{
area
}}
"
>
<input
id=
"sourceType"
type=
"hidden"
value=
"
{{
sourceType
}}
"
>
<input
id=
"openId"
type=
"hidden"
value=
"
{{
openId
}}
"
>
</div>
\ No newline at end of file
</div>
...
...
apps/passport/views/action/bind/relate-success.hbs
View file @
e8a667e
...
...
@@ -16,9 +16,9 @@
<li>
<div>
<a
class=
"btn btn-fixed-height"
href=
"
{{
goShopping
}}
"
>
开始购物
</a>
<a
class=
"btn btn-fixed-height"
href=
"
{{
https
goShopping
}}
"
>
开始购物
</a>
</div>
</li>
</ul>
</div>
</div>
\ No newline at end of file
</div>
...
...
apps/passport/views/action/login/index.hbs
View file @
e8a667e
...
...
@@ -62,22 +62,22 @@
</span>
<span
class=
"right"
>
<a
class=
"blue forget-password"
href=
"
{{
forgetPwd
}}
"
>
忘记密码
</a>
<a
class=
"blue forget-password"
href=
"
{{
https
forgetPwd
}}
"
>
忘记密码
</a>
</span>
</li>
<li
class=
"clearfix third-party-login"
>
<a
href=
"
{{
weixinLogin
}}
"
>
<a
href=
"
{{
https
weixinLogin
}}
"
>
<span
class=
"iconfont weixin"
>

</span>
</a>
<a
href=
"
{{
qqLogin
}}
"
>
<a
href=
"
{{
https
qqLogin
}}
"
>
<span
class=
"iconfont qq"
>

</span>
</a>
<a
href=
"
{{
weiboLogin
}}
"
>
<a
href=
"
{{
https
weiboLogin
}}
"
>
<span
class=
"iconfont weibo"
>

</span>
</a>
<a
href=
"
{{
alipayLogin
}}
"
>
<a
href=
"
{{
https
alipayLogin
}}
"
>
<span
class=
"iconfont alipay"
>

</span>
</a>
</li>
...
...
@@ -88,7 +88,7 @@
</span>
<span>
<a
class=
"blue"
href=
"
{{
fastReg
}}
"
>
快速注册
</a>
<a
class=
"blue"
href=
"
{{
https
fastReg
}}
"
>
快速注册
</a>
</span>
</li>
</ul>
...
...
apps/passport/views/partial/reg/register.hbs
View file @
e8a667e
...
...
@@ -73,7 +73,7 @@
我已阅读并同意遵守
</span>
<span
class=
"right"
>
<a
class=
"blue go-yoho-items"
href=
"
{{
itemUrl
}}
"
target=
"_blank"
>
YOHO!有货服务条款
</a>
<a
class=
"blue go-yoho-items"
href=
"
{{
https
itemUrl
}}
"
target=
"_blank"
>
YOHO!有货服务条款
</a>
</span>
</li>
<li
class=
"clearfix"
>
...
...
@@ -86,7 +86,7 @@
<li
class=
"clearfix quick-login-container"
>
<div
style=
"width: 100%;text-align: center"
>
已注册YOHO!BLK账号
<a
class=
"blue go-login"
href=
"
{{
loginUrl
}}
"
>
快速登录
</a>
<a
class=
"blue go-login"
href=
"
{{
https
loginUrl
}}
"
>
快速登录
</a>
</div>
</li>
</ul>
...
...
apps/product/controllers/query.js
View file @
e8a667e
...
...
@@ -21,6 +21,7 @@ const Query = {
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
);
q
.
order
=
q
.
order
||
's_n_desc'
;
q
.
yh_channel
=
channel
;
let
retData
=
{
module
:
'product'
,
...
...
@@ -46,7 +47,7 @@ const Query = {
retData
.
filter
=
DataHelper
.
filterHandle
(
data
.
filter
,
q
);
retData
.
filter
.
showPrice
=
data
.
total
>
10
;
retData
.
filter
.
showInfo
=
(
retData
.
filter
.
style
&&
retData
.
filter
.
style
.
length
>
0
)
||
(
data
.
standard
&&
data
.
standard
.
length
>
0
);
//eslint-disable-line
||
(
data
.
standard
&&
data
.
standard
.
length
>
0
);
//eslint-disable-line
retData
.
filter
.
useSmallSort
=
1
;
}
...
...
apps/product/models/search.js
View file @
e8a667e
...
...
@@ -37,18 +37,19 @@ function _paramHanlde(obj) {
// let _gender;
//
// if (obj.yh_channel) {
// switch (obj.yh_channel) {
// case 'men':
// _gender = '1,3';
// break;
// case 'women':
// _gender = '2,3';
// break;
// default:
// break;
// }
// }
if
(
obj
.
yh_channel
)
{
switch
(
obj
.
yh_channel
)
{
case
'men'
:
obj
.
yh_channel
=
'301'
;
break
;
case
'women'
:
obj
.
yh_channel
=
'302'
;
break
;
default
:
obj
.
yh_channel
=
'303'
;
break
;
}
}
// if (obj.gender || _gender) {
// obj.gender = obj.gender || _gender;
...
...
apps/product/views/action/newList.hbs
View file @
e8a667e
...
...
@@ -19,7 +19,7 @@
{{#if
banner
.
src
}}
<div
class=
"banner-img"
style=
"height: 200px;margin-bottom:30px;"
>
<a
href=
"
{{
banner
.
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
banner
.
url
}}
"
target=
"_blank"
>
<img
src=
"
{{
image
banner
.
src
850
200
1
}}
"
alt=
"
{{
banner
.
alt
}}
"
width=
"850"
height=
"200"
>
</a>
</div>
...
...
apps/product/views/action/shop-index.hbs
View file @
e8a667e
...
...
@@ -16,14 +16,14 @@
<div
class=
"center-content clearfix slide-warp"
>
{{#
each
largeSlideImg
}}
<div
class=
"slide-left"
>
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
https
url
}}
"
>
<img
src=
"
{{
src
}}
"
alt=
""
>
</a>
</div>
{{/
each
}}
<div
class=
"slide-right"
>
{{#
each
oneRowTwoColImages
}}
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
https
url
}}
"
>
<img
src=
"
{{
src
}}
"
alt=
""
>
</a>
{{/
each
}}
...
...
@@ -92,11 +92,11 @@
<div
class=
"goods-wrap"
>
{{#
each
products
}}
<div
class=
"goods-info"
data-skn=
"
{{
productSkn
}}
"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
data-original=
"
{{
image
defaultImages
270
366
}}
"
style=
"display: block;"
>
</a>
<div
class=
"desc"
>
<a
class=
"name"
href=
"
{{
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a>
<a
class=
"name"
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a>
<p
class=
"price"
>
¥
{{
round
salesPrice
2
}}
</p>
</div>
</div>
...
...
@@ -114,7 +114,7 @@
<div
class=
"editorial-wrap clearfix"
>
{{#
each
editorial
}}
<div
class=
"editorial-info"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
alt=
"
{{
title
}}
"
data-original=
"
{{
image
src
368
240
1
}}
"
width=
"368"
height=
"240"
style=
"display: block;"
>
</a>
...
...
apps/product/views/partial/brand-banner.hbs
View file @
e8a667e
...
...
@@ -4,20 +4,20 @@
<div
class=
"opt-wrap"
>
<div
class=
"center-content clearfix"
>
{{#
brandLogo
}}
<a
href=
"
{{
link
}}
"
class=
"brand-logo"
>
<a
href=
"
{{
https
link
}}
"
class=
"brand-logo"
>
<img
src=
"
{{
image
img
108
45
}}
"
>
</a>
{{/
brandLogo
}}
<p
class=
"opt right"
>
{{#
brandHome
}}
<a
href=
"
{{
link
}}
"
>
<a
href=
"
{{
https
link
}}
"
>
<i
class=
"iconfont"
>

</i>
{{
text
}}
</a>
{{/
brandHome
}}
{{#
brandIntro
}}
<a
href=
"
{{
link
}}
"
>
<a
href=
"
{{
https
link
}}
"
>
<i
class=
"iconfont"
>

</i>
{{
text
}}
</a>
...
...
apps/product/views/partial/list/goods-box.hbs
View file @
e8a667e
...
...
@@ -2,7 +2,7 @@
{{#
each
products
}}
<div
class=
"goods"
data-id=
"
{{
productId
}}
"
data-url=
"
{{
url
}}
"
>
<div
class=
"goods-img"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
image
defaultImages
263
351
}}
"
width=
"263"
height=
"351"
alt=
""
>
</a>
</div>
...
...
@@ -12,7 +12,7 @@
</div>
{{/if}}
<div
class=
"goods-name"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a>
<a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a>
</div>
<div
class=
"goods-price"
>
<span>
¥
{{
round
salesPrice
}}
</span>
...
...
apps/product/views/partial/list/shop-menu.hbs
View file @
e8a667e
...
...
@@ -3,7 +3,7 @@
<ul
class=
"shop-menu"
>
{{#
each
menus
}}
<li>
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
https
url
}}
"
>
{{
name
}}
{{#
icon
}}
<i
class=
"iconfont"
>

</i>
...
...
apps/shopping/modules/bank.js
View file @
e8a667e
...
...
@@ -8,71 +8,71 @@ const Bank = {
return
{
BOCB2C
:
{
name
:
'中国银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/zhongguo.png'
ico
:
'//static.yohobuy.com/images/pay/icon/zhongguo.png'
},
ABC
:
{
name
:
'中国农业银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/nongye.png'
ico
:
'//static.yohobuy.com/images/pay/icon/nongye.png'
},
SPABANK
:
{
name
:
'平安银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/pingan.png'
ico
:
'//static.yohobuy.com/images/pay/icon/pingan.png'
},
CMBC
:
{
name
:
'中国民生银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/minsheng.png'
ico
:
'//static.yohobuy.com/images/pay/icon/minsheng.png'
},
ICBCB2C
:
{
name
:
'中国工商银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/gongshang.png'
ico
:
'//static.yohobuy.com/images/pay/icon/gongshang.png'
},
SPDB
:
{
name
:
'浦发银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/pufa.png'
ico
:
'//static.yohobuy.com/images/pay/icon/pufa.png'
},
BJRCB
:
{
name
:
'北京农商银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/beijingnongshang.png'
ico
:
'//static.yohobuy.com/images/pay/icon/beijingnongshang.png'
},
HZCBB2C
:
{
name
:
'杭州银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/hangzhou.png'
ico
:
'//static.yohobuy.com/images/pay/icon/hangzhou.png'
},
CMB
:
{
name
:
'招商银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/zhaoshang.png'
ico
:
'//static.yohobuy.com/images/pay/icon/zhaoshang.png'
},
CIB
:
{
name
:
'兴业银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/xingye.png'
ico
:
'//static.yohobuy.com/images/pay/icon/xingye.png'
},
FDB
:
{
name
:
'富滇银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/fudian.png'
ico
:
'//static.yohobuy.com/images/pay/icon/fudian.png'
},
CEBDEBIT
:
{
name
:
'中国光大银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/guangda.png'
ico
:
'//static.yohobuy.com/images/pay/icon/guangda.png'
},
CCB
:
{
name
:
'中国建设银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/zhongguojianshe.png'
ico
:
'//static.yohobuy.com/images/pay/icon/zhongguojianshe.png'
},
GDB
:
{
name
:
'广发银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/guangfa.png'
ico
:
'//static.yohobuy.com/images/pay/icon/guangfa.png'
},
POSTGC
:
{
name
:
'中国邮政储蓄'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/zhongguoyouzhengchuxu.png'
ico
:
'//static.yohobuy.com/images/pay/icon/zhongguoyouzhengchuxu.png'
},
SHBANK
:
{
name
:
'上海银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/shanghai.png'
ico
:
'//static.yohobuy.com/images/pay/icon/shanghai.png'
},
NBBANK
:
{
name
:
'宁波银行'
,
ico
:
'
http:
//static.yohobuy.com/images/pay/icon/ningbo.png'
ico
:
'//static.yohobuy.com/images/pay/icon/ningbo.png'
}
};
}
...
...
apps/shopping/views/action/order.hbs
View file @
e8a667e
{{>
settle-header
}}
<div
class=
"shopping-order-page blk-page"
>
{{#
content
}}
<div
class=
"center-content"
>
{{>
bc-nav
}}
<div
class=
"address-info order-block"
>
<p
class=
"title"
>
收货信息
<span
class=
"right new-address"
>
新增收货地址
<i
class=
"iconfont"
>

</i>
</span>
</p>
<div
class=
"content"
>
<ul
id=
"address-list"
class=
"clearfix address-list shrink"
></ul>
<p
class=
"address-all vhide"
>
显示全部地址
<span
class=
"iconfont"
>

</span>
</p>
</div>
</div>
<div
class=
"payment-type order-block"
>
<p
class=
"title"
>
支付方式
</p>
<ul
class=
"content"
>
<li
class=
"chose-row clearfix focus"
>
<span
class=
"chose-block"
>
在线支付
</span>
<span
class=
"tip-text"
>
支持主流银行卡、微信、支付宝、银联等平台付款,方便快捷
</span>
</li>
</ul>
</div>
<div
class=
"dispatch-type order-block"
>
<p
class=
"title"
>
配送方式
</p>
<ul
class=
"content"
>
{{#
each
delivery_way
}}
<li
class=
"chose-row clearfix
{{#if
@first
}}
focus
{{/if}}
"
data-id=
"
{{
delivery_way_id
}}
"
>
<span
class=
"chose-block"
>
{{
delivery_way_name
}}
:运费¥
{{
round
delivery_way_cost
2
}}
</span>
</li>
{{/
each
}}
</ul>
</div>
<div
class=
"order-info order-block"
>
<div
class=
"order-inner"
>
<p
class=
"title"
>
订单信息
<a
class=
"right go-cart-link"
href=
"
{{
goCartLink
}}
"
>
返回购物袋修改
<span
class=
"iconfont"
>

</span>
</a>
</p>
{{#
with
shopping_cart_data
}}
{{#
isY
is_multi_package
}}
<div
class=
"multi-package-row"
>
温馨提示:您购买的商品
<em
class=
"blue"
>
分属不同仓库
</em>
,需要调拨,将被拆分成多个包裹送达
<span
class=
"iconfont show-package"
>

</span>
<div
class=
"package-list hide"
>
<div
class=
"package-up-icon"
></div>
{{#
each
..
/
package_list
}}
<div
class=
"package-item"
>
<p
class=
"package-title bold"
>
包裹
{{
math
@index
'+'
1
}}
:
{{#if
@first
}}
总仓发货
{{^}}
异地调拨
{{/if}}
</p>
{{#if
showToggle
}}
<span
class=
"iconfont toggle-icon left-icon"
>

</span>
<span
class=
"iconfont toggle-icon right-icon"
>

</span>
{{/if}}
<div
class=
"package-goods-wrap"
>
<ul
class=
"package-goods clearfix"
>
{{#
each
goods_list
}}
<li
class=
"left"
>
<img
class=
"lazy package-goods-img"
data-original=
"
{{
image
goods_images
100
134
}}
"
>
</li>
{{/
each
}}
</ul>
</div>
<p
class=
"package-shipping"
>
运费:¥
{{
shopping_cost
}}
元(原价
{{
shopping_orig_cost
}}
元,优惠
{{
shopping_cut_cost
}}
元)
</p>
</div>
{{/
each
}}
</div>
</div>
{{/
isY
}}
{{/
with
}}
<div
class=
"content"
>
<p
class=
"order-table-head clearfix"
>
<span
class=
"info"
>
商品信息
</span>
<span
class=
"color-size"
>
颜色尺码
</span>
<span
class=
"price"
>
单价
</span>
<span
class=
"number"
>
数量
</span>
</p>
<ul
class=
"order-table-body"
>
{{#
each
goods_list
}}
<li
class=
"order-goods clearfix"
>
<a
class=
"goods-img inline-block"
href=
"
{{
link
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
image
goods_images
100
148
}}
"
>
{{#if
isGift
}}
<span
class=
"gift-tag"
>
赠品
</span>
{{/if}}
</a>
<p
class=
"brand-and-name inline-block"
>
<a
class=
"brand-name"
href=
"
{{
brandUrl
}}
"
target=
"_blank"
>
{{
brand_name
}}
</a>
<a
class=
"name"
href=
"
{{
link
}}
"
target=
"_blank"
>
{{
product_name
}}
</a>
</p>
<p
class=
"color-size"
>
<span
class=
"color"
>
颜色:
{{
color_name
}}
</span>
<span
class=
"size"
>
尺码:
{{
size_name
}}
</span>
</p>
<p
class=
"price"
>
¥
{{
round
last_price
2
}}
</p>
<p
class=
"number"
>
<span
class=
"iconfont"
>

</span>
{{
buy_number
}}
</p>
</li>
{{/
each
}}
</ul>
</div>
</div>
</div>
<div
class=
"invoice-info order-block"
>
<p
class=
"title"
>
发票信息
</p>
<div
id=
"invoice-content"
class=
"content"
>
<div
class=
"invoice-radio"
>
{{>
icon
/
radio
}}
<label>
发票开具
</label>
</div>
</div>
</div>
<div
class=
"coin-and-remark"
>
<div
class=
"coin"
>
<p
class=
"title"
>
<span
class=
"iconfont coin-ctrl"
>

</span>
<span
class=
"coin-ctrl"
>
使用有货币
</span>
</p>
<div
class=
"content hide"
>
<div
class=
"using-coin"
>
本次使用有货币
<input
id=
"input-coin"
class=
"input coin-input"
type=
"text"
data-max=
"
{{
yoho_coin
}}
"
>
个
您当前共有有货币
<em
class=
"blue"
>
{{
yoho_coin
}}
</em>
个
<span
id=
"coin-tip"
class=
"coin-tip block blue vhide"
>
抵扣¥
<em
class=
"balance-coin"
></em></span>
<span
id=
"coin-sure"
class=
"btn disable"
>
确定
</span>
</div>
<div
class=
"used-coin hide"
>
本次使用有货币
<em
id=
"coin-used"
class=
"blue"
></em>
个,本次抵扣
<span
class=
"blue"
>
¥
<em
id=
"coin-deduction"
></em></span>
<span
class=
"btn white modify"
>
修改
</span>
<span
class=
"btn white cancel"
>
取消使用
</span>
</div>
</div>
</div>
<div
class=
"remark"
>
<p
class=
"title"
>
<span
class=
"iconfont remark-ctrl"
>

</span>
<span
class=
"remark-ctrl"
>
添加备注信息
</span>
</p>
<div
class=
"content hide"
>
<textarea
id=
"remark-content"
class=
"remark-content"
placeholder=
"声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效"
></textarea>
<div
id=
"print-price"
class=
"print-price"
>
是否打印价格:
<div
class=
"print-price-radio-group"
>
{{#
each
printPriceRadio
}}
<div
class=
"print-price-radio"
data-value=
"
{{
value
}}
"
>
<label>
{{
name
}}
</label>
{{>
icon
/
radio
}}
</div>
{{/
each
}}
<span
class=
"remark-tip"
>
(如:送朋友的商品可不打印价格哦!)
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"balance clearfix"
>
{{#
shopping_cart_data
}}
<div
class=
"balance-info left"
>
<p
class=
"receiver-wrap"
>
{{#
with
..
/
delivery_address
}}
<i>
收货信息:
</i>
<em
id=
"receiver"
>
{{
consignee
}}
{{
mobile
}}
{{
area
}}
{{
address
}}
</em>
{{/
with
}}
<span
class=
"right"
>
{{
selected_goods_count
}}
件商品
</span>
</p>
<p>
支付方式:
<em
id=
"balance-pay-type"
>
在线支付
</em>
</p>
</div>
<ul
id=
"balance-list"
class=
"balance-list right"
>
{{#
each
promotion_formula_list
}}
<li>
<span
class=
"balance-title"
>
{{
promotion
}}
{{#if
shippingCut
}}
<em>
(原价:
{{
shippingOrigin
}}
元,优惠:
{{
shippingCut
}}
元)
</em>
{{/if}}
</span>
<span
class=
"balance-cost"
>
{{
promotion_amount
}}
</span>
</li>
{{/
each
}}
<li
class=
"need-pay"
>
<span
class=
"balance-title"
>
应付金额
{{#if
shipping_cost
}}
(含运费)
{{/if}}
:
</span>
<span
id=
"balance-cost"
class=
"balance-cost"
data-cost=
"
{{
last_order_amount
}}
"
>
¥
<em>
{{
round
last_order_amount
2
}}
</em></span>
</li>
<li>
<span
id=
"submit-order"
class=
"btn submit-order"
>
提交订单
</span>
</li>
</ul>
{{/
shopping_cart_data
}}
</div>
{{!-- 服务端渲染,客户端使用 --}}
<script
id=
"invoice-dialog-tpl"
type=
"text/html"
>
<p class="dialog-title">发票信息</p>
<ul class="invoice-tab">
<li class="btn paper-invoice">纸质发票</li>
</ul>
<div class="invoice-entity el">
<div class="row clearfix">
<span class="label">
<em class="required-mark">*</em>
发票抬头:
</span>
<div class="row-content">
<div class="invoice-title-radio-group">
{{#
each
invoices
.
invoiceTitle
}}
<div class="invoice-title-radio
{{#if
myClass
}}
{{
myClass
}}{{/if}}
" data-value="
{{
value
}}
">
{{>
icon
/
radio
}}
<label>
{{
name
}}
</label>
</div>
{{/
each
}}
</div>
<div>
<input class="input invoice-title-input hide" type="text" maxlength="30" placeholder="请填写单位名称">
<span class="input-tip invoice-title-tip blue hide">
<span class="iconfont"></span>
请填写发票抬头
</span>
</div>
</div>
</div>
<div class="row clearfix">
<span class="label">
<em class="required-mark">*</em>
发票内容:
</span>
<div class="row-content">
<div class="invoice-content-radio-group">
{{#
each
invoices
.
invoiceContentList
}}
<div class="invoice-content-radio" data-value="
{{
invoices_type_id
}}
">
{{>
icon
/
radio
}}
<label>
{{
invoices_type_name
}}
</label>
</div>
{{/
each
}}
<
/div>
<
/div>
<
/div>
<
/div>
</script>
</div>
{{/
content
}}
</div>
\ No newline at end of file
{{>
settle-header
}}
<div
class=
"shopping-order-page blk-page"
>
{{#
content
}}
<div
class=
"center-content"
>
{{>
bc-nav
}}
<div
class=
"address-info order-block"
>
<p
class=
"title"
>
收货信息
<span
class=
"right new-address"
>
新增收货地址
<i
class=
"iconfont"
>

</i>
</span>
</p>
<div
class=
"content"
>
<ul
id=
"address-list"
class=
"clearfix address-list shrink"
></ul>
<p
class=
"address-all vhide"
>
显示全部地址
<span
class=
"iconfont"
>

</span>
</p>
</div>
</div>
<div
class=
"payment-type order-block"
>
<p
class=
"title"
>
支付方式
</p>
<ul
class=
"content"
>
<li
class=
"chose-row clearfix focus"
>
<span
class=
"chose-block"
>
在线支付
</span>
<span
class=
"tip-text"
>
支持主流银行卡、微信、支付宝、银联等平台付款,方便快捷
</span>
</li>
</ul>
</div>
<div
class=
"dispatch-type order-block"
>
<p
class=
"title"
>
配送方式
</p>
<ul
class=
"content"
>
{{#
each
delivery_way
}}
<li
class=
"chose-row clearfix
{{#if
@first
}}
focus
{{/if}}
"
data-id=
"
{{
delivery_way_id
}}
"
>
<span
class=
"chose-block"
>
{{
delivery_way_name
}}
:运费¥
{{
round
delivery_way_cost
2
}}
</span>
</li>
{{/
each
}}
</ul>
</div>
<div
class=
"order-info order-block"
>
<div
class=
"order-inner"
>
<p
class=
"title"
>
订单信息
<a
class=
"right go-cart-link"
href=
"
{{
https
goCartLink
}}
"
>
返回购物袋修改
<span
class=
"iconfont"
>

</span>
</a>
</p>
{{#
with
shopping_cart_data
}}
{{#
isY
is_multi_package
}}
<div
class=
"multi-package-row"
>
温馨提示:您购买的商品
<em
class=
"blue"
>
分属不同仓库
</em>
,需要调拨,将被拆分成多个包裹送达
<span
class=
"iconfont show-package"
>

</span>
<div
class=
"package-list hide"
>
<div
class=
"package-up-icon"
></div>
{{#
each
..
/
package_list
}}
<div
class=
"package-item"
>
<p
class=
"package-title bold"
>
包裹
{{
math
@index
'+'
1
}}
:
{{#if
@first
}}
总仓发货
{{^}}
异地调拨
{{/if}}
</p>
{{#if
showToggle
}}
<span
class=
"iconfont toggle-icon left-icon"
>

</span>
<span
class=
"iconfont toggle-icon right-icon"
>

</span>
{{/if}}
<div
class=
"package-goods-wrap"
>
<ul
class=
"package-goods clearfix"
>
{{#
each
goods_list
}}
<li
class=
"left"
>
<img
class=
"lazy package-goods-img"
data-original=
"
{{
image
goods_images
100
134
}}
"
>
</li>
{{/
each
}}
</ul>
</div>
<p
class=
"package-shipping"
>
运费:¥
{{
shopping_cost
}}
元(原价
{{
shopping_orig_cost
}}
元,优惠
{{
shopping_cut_cost
}}
元)
</p>
</div>
{{/
each
}}
</div>
</div>
{{/
isY
}}
{{/
with
}}
<div
class=
"content"
>
<p
class=
"order-table-head clearfix"
>
<span
class=
"info"
>
商品信息
</span>
<span
class=
"color-size"
>
颜色尺码
</span>
<span
class=
"price"
>
单价
</span>
<span
class=
"number"
>
数量
</span>
</p>
<ul
class=
"order-table-body"
>
{{#
each
goods_list
}}
<li
class=
"order-goods clearfix"
>
<a
class=
"goods-img inline-block"
href=
"
{{
https
link
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
image
goods_images
100
148
}}
"
>
{{#if
isGift
}}
<span
class=
"gift-tag"
>
赠品
</span>
{{/if}}
</a>
<p
class=
"brand-and-name inline-block"
>
<a
class=
"brand-name"
href=
"
{{
https
brandUrl
}}
"
target=
"_blank"
>
{{
brand_name
}}
</a>
<a
class=
"name"
href=
"
{{
https
link
}}
"
target=
"_blank"
>
{{
product_name
}}
</a>
</p>
<p
class=
"color-size"
>
<span
class=
"color"
>
颜色:
{{
color_name
}}
</span>
<span
class=
"size"
>
尺码:
{{
size_name
}}
</span>
</p>
<p
class=
"price"
>
¥
{{
round
last_price
2
}}
</p>
<p
class=
"number"
>
<span
class=
"iconfont"
>

</span>
{{
buy_number
}}
</p>
</li>
{{/
each
}}
</ul>
</div>
</div>
</div>
<div
class=
"invoice-info order-block"
>
<p
class=
"title"
>
发票信息
</p>
<div
id=
"invoice-content"
class=
"content"
>
<div
class=
"invoice-radio"
>
{{>
icon
/
radio
}}
<label>
发票开具
</label>
</div>
</div>
</div>
<div
class=
"coin-and-remark"
>
<div
class=
"coin"
>
<p
class=
"title"
>
<span
class=
"iconfont coin-ctrl"
>

</span>
<span
class=
"coin-ctrl"
>
使用有货币
</span>
</p>
<div
class=
"content hide"
>
<div
class=
"using-coin"
>
本次使用有货币
<input
id=
"input-coin"
class=
"input coin-input"
type=
"text"
data-max=
"
{{
yoho_coin
}}
"
>
个
您当前共有有货币
<em
class=
"blue"
>
{{
yoho_coin
}}
</em>
个
<span
id=
"coin-tip"
class=
"coin-tip block blue vhide"
>
抵扣¥
<em
class=
"balance-coin"
></em></span>
<span
id=
"coin-sure"
class=
"btn disable"
>
确定
</span>
</div>
<div
class=
"used-coin hide"
>
本次使用有货币
<em
id=
"coin-used"
class=
"blue"
></em>
个,本次抵扣
<span
class=
"blue"
>
¥
<em
id=
"coin-deduction"
></em></span>
<span
class=
"btn white modify"
>
修改
</span>
<span
class=
"btn white cancel"
>
取消使用
</span>
</div>
</div>
</div>
<div
class=
"remark"
>
<p
class=
"title"
>
<span
class=
"iconfont remark-ctrl"
>

</span>
<span
class=
"remark-ctrl"
>
添加备注信息
</span>
</p>
<div
class=
"content hide"
>
<textarea
id=
"remark-content"
class=
"remark-content"
placeholder=
"声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效"
></textarea>
<div
id=
"print-price"
class=
"print-price"
>
是否打印价格:
<div
class=
"print-price-radio-group"
>
{{#
each
printPriceRadio
}}
<div
class=
"print-price-radio"
data-value=
"
{{
value
}}
"
>
<label>
{{
name
}}
</label>
{{>
icon
/
radio
}}
</div>
{{/
each
}}
<span
class=
"remark-tip"
>
(如:送朋友的商品可不打印价格哦!)
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"balance clearfix"
>
{{#
shopping_cart_data
}}
<div
class=
"balance-info left"
>
<p
class=
"receiver-wrap"
>
{{#
with
..
/
delivery_address
}}
<i>
收货信息:
</i>
<em
id=
"receiver"
>
{{
consignee
}}
{{
mobile
}}
{{
area
}}
{{
address
}}
</em>
{{/
with
}}
<span
class=
"right"
>
{{
selected_goods_count
}}
件商品
</span>
</p>
<p>
支付方式:
<em
id=
"balance-pay-type"
>
在线支付
</em>
</p>
</div>
<ul
id=
"balance-list"
class=
"balance-list right"
>
{{#
each
promotion_formula_list
}}
<li>
<span
class=
"balance-title"
>
{{
promotion
}}
{{#if
shippingCut
}}
<em>
(原价:
{{
shippingOrigin
}}
元,优惠:
{{
shippingCut
}}
元)
</em>
{{/if}}
</span>
<span
class=
"balance-cost"
>
{{
promotion_amount
}}
</span>
</li>
{{/
each
}}
<li
class=
"need-pay"
>
<span
class=
"balance-title"
>
应付金额
{{#if
shipping_cost
}}
(含运费)
{{/if}}
:
</span>
<span
id=
"balance-cost"
class=
"balance-cost"
data-cost=
"
{{
last_order_amount
}}
"
>
¥
<em>
{{
round
last_order_amount
2
}}
</em></span>
</li>
<li>
<span
id=
"submit-order"
class=
"btn submit-order"
>
提交订单
</span>
</li>
</ul>
{{/
shopping_cart_data
}}
</div>
{{!-- 服务端渲染,客户端使用 --}}
<script
id=
"invoice-dialog-tpl"
type=
"text/html"
>
<p class="dialog-title">发票信息</p>
<ul class="invoice-tab">
<li class="btn paper-invoice">纸质发票</li>
</ul>
<div class="invoice-entity el">
<div class="row clearfix">
<span class="label">
<em class="required-mark">*</em>
发票抬头:
</span>
<div class="row-content">
<div class="invoice-title-radio-group">
{{#
each
invoices
.
invoiceTitle
}}
<div class="invoice-title-radio
{{#if
myClass
}}
{{
myClass
}}{{/if}}
" data-value="
{{
value
}}
">
{{>
icon
/
radio
}}
<label>
{{
name
}}
</label>
</div>
{{/
each
}}
</div>
<div>
<input class="input invoice-title-input hide" type="text" maxlength="30" placeholder="请填写单位名称">
<span class="input-tip invoice-title-tip blue hide">
<span class="iconfont"></span>
请填写发票抬头
</span>
</div>
</div>
</div>
<div class="row clearfix">
<span class="label">
<em class="required-mark">*</em>
发票内容:
</span>
<div class="row-content">
<div class="invoice-content-radio-group">
{{#
each
invoices
.
invoiceContentList
}}
<div class="invoice-content-radio" data-value="
{{
invoices_type_id
}}
">
{{>
icon
/
radio
}}
<label>
{{
invoices_type_name
}}
</label>
</div>
{{/
each
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
</script>
</div>
{{/
content
}}
</div>
...
...
apps/shopping/views/action/pay-success.hbs
View file @
e8a667e
...
...
@@ -27,8 +27,8 @@
</div>
<div
class=
"btns right"
>
<a
class=
"btn go-check-order"
href=
"
{{
orderHref
}}
"
>
查看订单详情
</a>
<a
class=
"btn"
href=
"
{{
walkHref
}}
"
>
继续逛逛
</a>
<a
class=
"btn go-check-order"
href=
"
{{
https
orderHref
}}
"
>
查看订单详情
</a>
<a
class=
"btn"
href=
"
{{
https
walkHref
}}
"
>
继续逛逛
</a>
</div>
</div>
...
...
config/common.js
View file @
e8a667e
...
...
@@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
module
.
exports
=
{
app
:
'web'
,
appVersion
:
'4.
6
.0'
,
// 调用api接口版本
appVersion
:
'4.
9
.0'
,
// 调用api接口版本
port
:
6003
,
siteUrl
:
'//www.yohoblk.com'
,
signExtend
:
{
...
...
doraemon/models/header.js
View file @
e8a667e
...
...
@@ -33,7 +33,7 @@ const getMenuData = () => (
cn
:
'潮流嘉年华'
,
en
:
'YO\'HOOD'
},
{
link
:
'//www.yohobuy.com'
,
link
:
'
http:
//www.yohobuy.com'
,
cn
:
'有货'
,
en
:
'YOHO!BUY'
}]
...
...
doraemon/views/error/404.hbs
View file @
e8a667e
...
...
@@ -3,6 +3,6 @@
<div
class=
"tips"
>
<span
class=
"tip"
>
哎呀,您访问的页面走丢了...
</span>
<span
class=
"tips-english"
>
404 File Not Found, Sorry
</span>
<span>
建议您:
<a
href=
"javascript:location.reload()"
>
刷新该网页/
</a><a
href=
"javascript:history.go(-1)"
>
返回上一页/
</a>
<a
href=
"
http:
//www.yohoblk.com"
>
去首页看看
</a></span>
<span>
建议您:
<a
href=
"javascript:location.reload()"
>
刷新该网页/
</a><a
href=
"javascript:history.go(-1)"
>
返回上一页/
</a>
<a
href=
"//www.yohoblk.com"
>
去首页看看
</a></span>
</div>
</div>
\ No newline at end of file
</div>
...
...
doraemon/views/error/500.hbs
View file @
e8a667e
...
...
@@ -3,6 +3,6 @@
<div
class=
"tips"
>
<span
class=
"tip"
>
哎呀,程序出错了...
</span>
<span
class=
"tips-english"
>
500-Server Internal Error
</span>
<span>
建议您:
<a
href=
"javascript:location.reload()"
>
刷新该网页/
</a><a
href=
"javascript:history.go(-1)"
>
返回上一页/
</a>
<a
href=
"
http:
//www.yohoblk.com"
>
去首页看看
</a></span>
<span>
建议您:
<a
href=
"javascript:location.reload()"
>
刷新该网页/
</a><a
href=
"javascript:history.go(-1)"
>
返回上一页/
</a>
<a
href=
"//www.yohoblk.com"
>
去首页看看
</a></span>
</div>
</div>
\ No newline at end of file
</div>
...
...
doraemon/views/partial/footer.hbs
View file @
e8a667e
<div
class=
"blk-footer"
>
<div
class=
"center-content"
>
<ul
class=
"about-us clearfix"
>
<li><a
href=
"
{{
siteUrl
}}
"
>
BLK首页
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
"
>
BLK首页
</a></li>
<li>
<a
href=
"http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094"
target=
"_blank"
>
客户服务
</a>
</li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=2"
target=
"_blank"
>
支付方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=31"
target=
"_blank"
>
配送方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=41"
target=
"_blank"
>
售后服务
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/help?id=2"
target=
"_blank"
>
支付方式
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/help?id=31"
target=
"_blank"
>
配送方式
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/help?id=41"
target=
"_blank"
>
售后服务
</a></li>
</ul>
<div
class=
"record-info"
>
<p>
...
...
@@ -20,4 +20,4 @@
<div
class=
"return-top hide"
>
{{>
icon
/
up
}}
</div>
</div>
\ No newline at end of file
</div>
...
...
doraemon/views/partial/goods.hbs
View file @
e8a667e
<div
class=
"goods-info"
data-skn=
"
{{
skn
}}
"
>
<a
href=
"
{{
link
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
data-original=
"
{{
img
}}
"
>
</a>
<div
class=
"desc"
>
<a
class=
"name"
href=
"
{{
link
}}
"
target=
"_blank"
>
{{
name
}}
</a>
<p
class=
"price"
>
¥
{{
price
}}
</p>
</div>
</div>
\ No newline at end of file
<div
class=
"goods-info"
data-skn=
"
{{
skn
}}
"
>
<a
href=
"
{{
https
link
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
data-original=
"
{{
img
}}
"
>
</a>
<div
class=
"desc"
>
<a
class=
"name"
href=
"
{{
https
link
}}
"
target=
"_blank"
>
{{
name
}}
</a>
<p
class=
"price"
>
¥
{{
price
}}
</p>
</div>
</div>
...
...
doraemon/views/partial/nav-menu.hbs
View file @
e8a667e
...
...
@@ -5,7 +5,7 @@
<ul
class=
"main-nav-list"
>
{{#
navbars
}}
<li
class=
"nav-item
{{#if
cur
}}
cur
{{/if}}
"
>
<a
href=
"
{{
link
}}
"
{{#if
isNewPage
}}
target=
"_blank"
{{/if}}
>
<a
href=
"
{{
https
link
}}
"
{{#if
isNewPage
}}
target=
"_blank"
{{/if}}
>
<span
class=
"nav-en"
>
{{
en
}}
</span>
<span
class=
"nav-cn"
>
{{
cn
}}
</span>
</a>
...
...
@@ -22,7 +22,7 @@
<ul
class=
"sub-nav-list clearfix"
>
{{#
subNav
}}
<li
{{#if
thirdNav
}}
class=
"contain-third"
{{/if}}
>
<a
href=
"
{{
link
}}
"
>
<a
href=
"
{{
https
link
}}
"
>
{{
en
}}{{
cn
}}
</a>
{{#if
thirdNav
}}
...
...
@@ -33,14 +33,14 @@
{{#
this
}}
{{#if
category
}}
<dt>
<a
href=
"
{{
link
}}
"
>
{{
name
}}
</a>
<a
href=
"
{{
https
link
}}
"
>
{{
name
}}
</a>
{{#if
hot
}}
<span
class=
"hot iconfont"
>

</span>
{{/if}}
</dt>
{{^}}
<dd>
<a
href=
"
{{
link
}}
"
>
{{
name
}}
</a>
<a
href=
"
{{
https
link
}}
"
>
{{
name
}}
</a>
{{#if
hot
}}
<span
class=
"hot iconfont"
>

</span>
{{/if}}
...
...
@@ -81,4 +81,4 @@
</div>
</div>
</div>
{{/
navMenu
}}
\ No newline at end of file
{{/
navMenu
}}
...
...
doraemon/views/partial/path-nav.hbs
View file @
e8a667e
...
...
@@ -2,13 +2,13 @@
<p
class=
"path-nav"
>
{{#
each
nav
}}
{{#if
link
}}
<a
{{#if
@last
}}
class=
"last"
{{/if}}
href=
"
{{
link
}}
"
title=
"
{{
pathTitle
}}
"
>
{{{
name
}}}
</a>
<a
{{#if
@last
}}
class=
"last"
{{/if}}
href=
"
{{
https
link
}}
"
title=
"
{{
pathTitle
}}
"
>
{{{
name
}}}
</a>
{{^}}
<span
{{#if
@last
}}
class=
"last"
{{/if}}
title=
"
{{
pathTitle
}}
"
>
{{{
name
}}}
</span>
{{/if}}
{{#
unless
@last
}}
<span
class=
"icon
font icon
"
>
⁄
</span>
<span
class=
"icon"
>
⁄
</span>
{{/
unless
}}
{{/
each
}}
</p>
...
...
doraemon/views/partial/settle-header.hbs
View file @
e8a667e
<div
class=
"blk-settle-header"
>
<div
class=
"center-content"
>
<div
class=
"main-logo"
>
<a
href=
"
{{
siteUrl
}}
"
></a>
<a
href=
"
{{
https
siteUrl
}}
"
></a>
</div>
<ul
class=
"header-tools right clearfix"
>
<li>
{{#if
userName
}}
Hi~
<a
href=
"
{{
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
siteUrl
}}
/passport/logout"
>
[退出]
</a>
<a
href=
"
{{
https
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
https
siteUrl
}}
/passport/logout"
>
[退出]
</a>
{{^}}
<a
href=
"
{{
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
siteUrl
}}
/passport/reg"
>
注册
</a>
<a
href=
"
{{
https
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
https
siteUrl
}}
/passport/reg"
>
注册
</a>
{{/if}}
</li>
<li><a
href=
"
{{
siteUrl
}}
/me"
>
个人中心
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
>
帮助中心
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/me"
>
个人中心
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/help"
>
帮助中心
</a></li>
</ul>
</div>
</div>
\ No newline at end of file
</div>
...
...
doraemon/views/partial/sign-header.hbs
View file @
e8a667e
<div
class=
"blk-sign-header"
>
<div
class=
"center-content"
>
<div
class=
"main-logo"
>
<a
href=
"
{{
siteUrl
}}
"
></a>
<a
href=
"
{{
https
siteUrl
}}
"
></a>
</div>
<ul
class=
"header-tools right clearfix"
>
<li>
{{#if
userName
}}
Hi~
<a
href=
"
{{
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
siteUrl
}}
/passport/logout"
>
[退出]
</a>
<a
href=
"
{{
https
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
https
siteUrl
}}
/passport/logout"
>
[退出]
</a>
{{^}}
<a
href=
"
{{
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
siteUrl
}}
/passport/reg"
>
注册
</a>
<a
href=
"
{{
https
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
https
siteUrl
}}
/passport/reg"
>
注册
</a>
{{/if}}
</li>
<li><a
href=
"
{{
siteUrl
}}
"
>
首页
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
>
帮助中心
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
"
>
首页
</a></li>
<li><a
href=
"
{{
https
siteUrl
}}
/help"
>
帮助中心
</a></li>
<li>
客服电话
<span>
400-889-9646
</span></li>
</ul>
</div>
</div>
\ No newline at end of file
</div>
...
...
public/js/editorial/detail.page.js
View file @
e8a667e
...
...
@@ -98,7 +98,7 @@ $('#collect-btn').click(function() {
new
_alert
(
data
.
message
).
show
();
$this
.
toggleClass
(
'collected'
);
}
else
if
(
data
.
code
===
400
)
{
window
.
location
.
href
=
'
http:
//www.yohoblk.com/passport/login'
;
window
.
location
.
href
=
'//www.yohoblk.com/passport/login'
;
}
else
{
new
_alert
(
data
.
message
).
show
();
}
...
...
@@ -148,7 +148,7 @@ function comment() {
// clear comment-text
$
(
'#comment-info'
).
val
(
''
).
keyup
();
}
else
if
(
data
.
code
===
400
)
{
window
.
location
.
href
=
'
http:
//www.yohoblk.com/passport/login'
;
window
.
location
.
href
=
'//www.yohoblk.com/passport/login'
;
}
else
{
new
_alert
(
data
.
message
).
show
();
}
...
...
public/js/me/exchange.page.js
View file @
e8a667e
var
colorTpl
=
require
(
'../../tpl/me/color-list.hbs'
);
var
sizeTpl
=
require
(
'../../tpl/me/size-list.hbs'
);
var
lazyLoad
=
require
(
'yoho-jquery-lazyload'
);
var
dialog
=
require
(
'../plugins/dialog'
);
var
_alert
=
dialog
.
Alert
;
var
addrSelector
=
require
(
'../plugins/cascading-address'
);
var
addr
;
var
addressReg
=
/^
[\s\S]{2,100}
$/
;
var
phoneReg
=
/^
(
13
[
0-9
]
|15
[
012356789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
;
var
mobDefault
=
$
(
'#mob'
).
val
();
// 手机号默认值
var
validate
=
require
(
'./order/validation'
);
var
imgBoxTpl
=
require
(
'../../tpl/me/thumbnail.hbs'
);
var
changeTypeTpl
=
require
(
'../../tpl/me/change-type.hbs'
);
var
upload
=
require
(
'../plugins/upload'
);
var
validateMap
=
{
user
:
{
sl
:
'#user'
,
v
:
{
maxLength
:
12
,
minLength
:
2
,
necessary
:
true
,
errMsg
:
'真实姓名至少2个字符,最多12个字符'
}
},
addr
:
{
sl
:
'#addr'
,
v
:
{
reg
:
addressReg
,
errMsg
:
'详细地址不能为空'
}
},
mob
:
{
sl
:
'#mob'
,
v
:
{
reg
:
phoneReg
,
errMsg
:
'您输入的联系电话格式不正确'
}
},
mob1
:
{
sl
:
'#mob'
,
v
:
{
reg
:
/^
(
13
[
0-9
]
|15
[
012356789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9, *
]{8}
$/
,
errMsg
:
'您输入的联系电话格式不正确'
}
}
};
lazyLoad
(
$
(
'.banner-img'
));
// 添加.check方法
require
(
'../plugins/check'
);
// 个人中心共用代码加载
require
(
'./me'
);
function
setActive
(
$item
)
{
var
color
=
$item
.
find
(
'.color-text'
).
data
(
'color'
);
var
size
=
$item
.
find
(
'.size-text'
).
data
(
'size'
);
var
$colorList
=
$item
.
find
(
'.color-list'
);
var
$sizeList
=
$item
.
find
(
'.size-list'
);
var
activeIndex
=
0
;
$colorList
.
find
(
'.img-box'
).
each
(
function
(
i
,
box
)
{
var
$box
=
$
(
box
);
if
(
$box
.
find
(
'img'
).
data
(
'color'
)
===
color
)
{
$colorList
.
find
(
'.img-box'
).
eq
(
i
).
addClass
(
'active'
);
activeIndex
=
i
;
return
false
;
}
});
$sizeList
=
$sizeList
.
eq
(
activeIndex
).
removeClass
(
'hide'
);
$sizeList
.
find
(
'span'
).
each
(
function
(
i
,
s
)
{
var
$size
=
$
(
s
);
if
(
$size
.
data
(
'size'
)
===
size
)
{
$sizeList
.
find
(
'span'
).
eq
(
i
).
addClass
(
'active'
);
}
});
}
function
renderList
(
data
)
{
var
cTpl
;
var
sTpl
;
var
$el
=
$
(
'.goods-container'
);
var
resultId
;
var
resultSkn
;
if
(
data
)
{
resultId
=
data
.
productId
;
resultSkn
=
data
.
productSkn
;
$el
.
each
(
function
(
index
,
item
)
{
var
$item
=
$
(
item
);
var
id
=
$item
.
data
(
'id'
);
var
skn
=
$item
.
data
(
'skn'
);
var
$form
;
if
(
id
===
resultId
&&
skn
===
resultSkn
)
{
$form
=
$item
.
closest
(
'.table-body'
).
next
(
'.form'
);
if
(
!
$form
.
find
(
'.color-list'
).
length
)
{
cTpl
=
colorTpl
(
data
);
sTpl
=
sizeTpl
(
data
);
$form
.
find
(
'.group.color'
).
append
(
cTpl
);
$form
.
find
(
'.group.size'
).
append
(
sTpl
);
setActive
(
$form
);
}
}
});
}
}
function
bindColorEvent
()
{
$
(
'.color-list img'
).
off
(
'clice'
).
on
(
'click'
,
function
()
{
var
$this
=
$
(
this
);
var
$sizeList
=
$this
.
closest
(
'.group'
).
next
(
'.group'
).
find
(
'.size-list'
);
var
index
=
$this
.
data
(
'index'
);
var
colorId
=
$this
.
data
(
'color'
);
var
colorText
=
$this
.
attr
(
'alt'
);
var
$c
=
$this
.
closest
(
'.group.color'
).
find
(
'.color-text'
);
$
(
'.size-list .active'
).
removeClass
(
'active'
);
$c
.
text
(
colorText
);
$c
.
attr
(
'data-color'
,
colorId
);
$this
.
closest
(
'.color-list'
).
find
(
'.active'
).
removeClass
(
'active'
);
$this
.
parent
().
addClass
(
'active'
);
$sizeList
.
removeClass
(
'hide'
);
$sizeList
.
addClass
(
'hide'
);
$sizeList
.
eq
(
index
).
removeClass
(
'hide'
);
});
}
function
initSizeId
()
{
var
s
=
$
(
'.size-list:not("hide")'
).
find
(
'span'
).
eq
(
0
).
data
(
'size'
);
$
(
'.group.size .size-text'
).
eq
(
0
).
attr
(
'data-size'
,
s
);
}
function
bindSizeEvent
()
{
$
(
'.size-list span'
).
off
(
'click'
).
on
(
'click'
,
function
()
{
var
$this
=
$
(
this
);
var
s
=
$this
.
text
();
var
id
=
$this
.
data
(
'size'
);
var
$s
=
$this
.
closest
(
'.group.size'
).
find
(
'.size-text'
);
if
(
$this
.
hasClass
(
'disable'
))
{
return
false
;
}
$this
.
parent
().
find
(
'.active'
).
removeClass
(
'active'
);
$this
.
addClass
(
'active'
);
$s
.
text
(
s
);
$s
.
attr
(
'data-size'
,
id
);
});
}
function
getProductInfo
()
{
var
$el
=
$
(
'.goods-container'
);
$el
.
each
(
function
(
index
,
item
)
{
var
id
=
$
(
item
).
data
(
'id'
);
var
skn
=
$
(
item
).
data
(
'skn'
);
if
(
id
&&
skn
)
{
$
.
ajax
({
url
:
'/me/return/getProductInfo'
,
data
:
{
productId
:
id
,
productSkn
:
skn
}
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
renderList
(
result
.
data
);
initSizeId
();
bindColorEvent
();
bindSizeEvent
();
}
});
}
});
}
function
bindSelectEvent
()
{
$
(
'.exchange-reasons'
).
on
(
'change'
,
function
()
{
var
$op
=
$
(
this
).
find
(
'option:selected'
);
$
(
this
).
attr
(
'data-reason'
,
$op
.
val
());
if
(
$op
.
hasClass
(
'is-special'
))
{
$op
.
closest
(
'.table-body'
).
siblings
(
'.special-reason'
).
show
();
}
else
{
$op
.
closest
(
'.table-body'
).
siblings
(
'.special-reason'
).
hide
();
}
});
}
function
bindTypeEvent
()
{
$
(
'.change-type .type'
).
on
(
'click'
,
function
()
{
$
(
'.change-type .type'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
});
}
function
bindCheckboxEvent
()
{
$
(
'.checkbox-box'
).
check
({
type
:
'checkbox'
,
group
:
'exchange-good'
,
onChange
:
function
(
ele
,
checked
)
{
var
$box
=
$
(
ele
).
closest
(
'.change-info-box'
);
if
(
checked
)
{
$box
.
addClass
(
'will-change'
);
$box
.
find
(
'.form'
).
removeClass
(
'hide'
);
}
else
{
$box
.
removeClass
(
'will-change'
);
$box
.
find
(
'.form'
).
addClass
(
'hide'
);
}
if
(
$
(
'.will-change'
).
length
)
{
$
(
'.btn.disable'
).
removeClass
(
'disable'
);
}
else
{
$
(
'.btn.confirm'
).
addClass
(
'disable'
);
}
}
});
}
function
submitChange
(
d
)
{
$
.
ajax
({
url
:
'/me/return/submitExchange'
,
data
:
d
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
location
.
href
=
'http://www.yohoblk.com/me/return/exchange/detail/?orderCode='
+
result
.
data
.
apply_id
;
}
else
{
new
_alert
(
'<h1>'
+
result
.
message
+
'</h1>'
).
show
();
}
}).
fail
(
function
(
err
)
{
console
.
log
(
err
);
new
_alert
(
'<h1>出错了!</h1>'
).
show
();
});
}
function
validateData
()
{
var
$inputs
=
$
(
'.express-info-box .require input'
);
var
pass
=
true
;
$inputs
.
each
(
function
(
idx
,
input
)
{
var
k
=
input
.
id
;
var
v
=
null
;
if
(
k
&&
validateMap
[
k
])
{
v
=
validateMap
[
k
];
if
(
validateMap
[
k
].
sl
===
'#mob'
&&
mobDefault
===
$
(
this
).
val
())
{
v
=
validateMap
.
mob1
;
}
if
(
!
validate
.
start
(
v
.
sl
,
v
.
v
))
{
pass
=
false
;
}
}
});
// 检查地址
if
(
!
validate
.
addr
(
addr
.
getAreaIds
(),
{
el
:
'#city'
,
errMsg
:
'请填写完整的省市区信息'
}))
{
pass
=
false
;
}
return
pass
;
}
function
bindConfirmEvent
()
{
$
(
'.confirm'
).
on
(
'click'
,
function
()
{
var
$changeGood
=
$
(
'.change-info-box.will-change'
);
var
changeGoodsList
=
[];
var
changeData
=
{};
var
$imgs
;
var
imgs
=
[];
if
(
$
(
this
).
hasClass
(
'disable'
))
{
return
false
;
}
if
(
!
validateData
())
{
return
false
;
}
$changeGood
.
each
(
function
(
index
,
good
)
{
var
goodObj
=
{};
var
$good
=
$
(
good
);
var
$c
=
$good
.
find
(
'.goods-container'
);
var
$f
=
$good
.
find
(
'.form'
);
var
$specialReason
=
$good
.
find
(
'.special-reason'
);
$imgs
=
null
;
imgs
=
[];
goodObj
.
product_skn
=
$c
.
data
(
'skn'
);
goodObj
.
product_skc
=
$c
.
data
(
'skc'
);
goodObj
.
product_sku
=
$c
.
data
(
'sku'
);
goodObj
.
last_price
=
$c
.
data
(
'price'
);
goodObj
.
product_id
=
$c
.
data
(
'id'
);
goodObj
.
goods_type
=
$c
.
data
(
'goodsType'
);
goodObj
.
exchange_reason
=
$c
.
find
(
'.exchange-reasons'
).
data
(
'reason'
);
goodObj
.
new_goods_id
=
$f
.
find
(
'.color-list .img-box.active img'
).
data
(
'goodsId'
);
goodObj
.
new_product_sku
=
$f
.
find
(
'.size-list span.active'
).
data
(
'sku'
);
if
(
$specialReason
.
length
&&
$specialReason
.
get
(
0
).
style
.
display
===
'block'
)
{
goodObj
.
remark
=
$specialReason
.
find
(
'.right-content'
).
find
(
'.mark-text'
).
val
();
$imgs
=
$specialReason
.
find
(
'.right-content'
).
find
(
'.thumb-box'
);
if
(
$imgs
.
length
)
{
$imgs
.
each
(
function
(
idx
,
img
)
{
imgs
.
push
(
$
(
img
).
data
(
'img'
));
});
goodObj
.
evidence_images
=
imgs
;
}
}
changeGoodsList
.
push
(
goodObj
);
});
changeData
.
app_type
=
1
;
// BLK的类型规定为1
changeData
.
goods
=
changeGoodsList
;
changeData
.
area_code
=
addr
.
getAreaIds
().
split
(
','
)[
2
];
changeData
.
order_code
=
$
(
'.returns-wrap>.order'
).
data
(
'code'
);
changeData
.
consignee_name
=
$
(
'#user'
).
val
();
changeData
.
address
=
$
(
'#addr'
).
val
();
changeData
.
delivery_tpye
=
$
(
'.change-type .type.active'
).
data
(
'type'
);
changeData
.
mobile
=
$
(
'#mob'
).
val
();
submitChange
(
changeData
);
});
}
function
bindBlurEvent
()
{
$
(
'.express-info-box .require input'
).
on
(
'blur'
,
function
()
{
var
$this
=
$
(
this
);
var
v
=
null
;
if
(
$this
.
val
().
length
>
0
&&
validateMap
[
this
.
id
])
{
v
=
validateMap
[
this
.
id
];
if
(
v
.
sl
===
'#mob'
&&
mobDefault
===
$
(
this
).
val
())
{
v
=
validateMap
.
mob1
;
}
validate
.
start
(
v
.
sl
,
v
.
v
);
}
});
}
function
initAddr
(
areaCode
)
{
addr
=
addrSelector
({
el
:
'#city'
});
if
(
areaCode
)
{
addr
.
setAddress
(
areaCode
.
toString
());
}
}
function
bindImgDeleteEvent
()
{
$
(
'.operation-box .delete'
).
off
(
'click'
).
on
(
'click'
,
function
()
{
var
$thumb
=
$
(
this
).
closest
(
'.thumb-box'
);
var
$t
=
$thumb
.
siblings
(
'.img-up-tip'
);
var
number
=
$
(
this
).
closest
(
'.left.right-content'
).
find
(
'.thumb-box'
).
length
-
1
;
$t
.
text
(
number
+
'/4'
);
$thumb
.
siblings
(
'.img-upload'
).
show
();
$thumb
.
remove
();
});
}
function
doUpload
(
count
,
goodIndex
)
{
var
$el
=
$
(
'*[data-good-index='
+
goodIndex
+
']'
);
if
(
count
<
4
)
{
upload
.
up
({
callback
:
function
(
result
)
{
var
img
;
var
$t
;
var
o
;
var
n
;
if
(
result
.
code
===
200
)
{
n
=
parseInt
(
$el
.
siblings
(
'.thumb-box'
).
length
,
10
);
o
=
{
src
:
result
.
data
};
if
(
result
.
imgs
&&
result
.
imgs
.
length
)
{
o
.
url
=
result
.
imgs
[
0
];
}
img
=
imgBoxTpl
(
o
);
$t
=
$el
.
next
(
'.img-up-tip'
);
$el
.
before
(
img
);
n
+=
1
;
$t
.
text
(
n
+
'/4'
);
bindImgDeleteEvent
();
if
(
n
>=
4
)
{
$el
.
hide
();
}
}
else
{
new
_alert
(
result
.
message
).
show
();
}
}
});
}
}
function
bindUploadEvent
()
{
var
$tip
=
$
(
'.img-up-tip'
);
$tip
.
text
(
'0/4'
);
$
(
'.img-upload'
).
each
(
function
(
index
,
uploadBtn
)
{
$
(
uploadBtn
).
on
(
'click'
,
function
()
{
var
that
=
this
;
var
n
=
parseInt
(
$
(
that
).
siblings
(
'.thumb-box'
).
length
,
10
);
var
goodIndex
=
$
(
that
).
data
(
'good-index'
);
if
(
n
>
4
)
{
return
false
;
}
doUpload
(
n
,
goodIndex
);
});
});
}
function
bindKeyUpEvent
()
{
$
(
'.mark-text'
).
on
(
'keyup'
,
function
()
{
var
$this
=
$
(
this
),
str
=
$
.
trim
(
$this
.
val
());
if
(
str
.
length
>
100
)
{
str
=
str
.
substring
(
0
,
100
);
}
$this
.
val
(
str
);
});
}
function
getChangeType
(
areaCode
)
{
$
.
ajax
({
url
:
'/me/return/getChangeType'
,
data
:
{
areaCode
:
areaCode
}
}).
done
(
function
(
result
)
{
var
changeTypeHtml
=
changeTypeTpl
({
type
:
result
.
data
});
if
(
changeTypeHtml
.
length
)
{
$
(
'.change-type .box-title'
).
after
(
changeTypeHtml
);
bindTypeEvent
();
}
});
}
$
(
document
).
on
(
'ready'
,
function
()
{
var
areaCode
=
$
(
'#city'
).
data
(
'code'
);
getProductInfo
();
getChangeType
(
areaCode
);
initAddr
(
areaCode
);
bindSelectEvent
();
bindCheckboxEvent
();
bindConfirmEvent
();
bindBlurEvent
();
bindUploadEvent
();
bindKeyUpEvent
();
});
var
colorTpl
=
require
(
'../../tpl/me/color-list.hbs'
);
var
sizeTpl
=
require
(
'../../tpl/me/size-list.hbs'
);
var
lazyLoad
=
require
(
'yoho-jquery-lazyload'
);
var
dialog
=
require
(
'../plugins/dialog'
);
var
_alert
=
dialog
.
Alert
;
var
addrSelector
=
require
(
'../plugins/cascading-address'
);
var
addr
;
var
addressReg
=
/^
[\s\S]{2,100}
$/
;
var
phoneReg
=
/^
(
13
[
0-9
]
|15
[
012356789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
;
var
mobDefault
=
$
(
'#mob'
).
val
();
// 手机号默认值
var
validate
=
require
(
'./order/validation'
);
var
imgBoxTpl
=
require
(
'../../tpl/me/thumbnail.hbs'
);
var
changeTypeTpl
=
require
(
'../../tpl/me/change-type.hbs'
);
var
upload
=
require
(
'../plugins/upload'
);
var
validateMap
=
{
user
:
{
sl
:
'#user'
,
v
:
{
maxLength
:
12
,
minLength
:
2
,
necessary
:
true
,
errMsg
:
'真实姓名至少2个字符,最多12个字符'
}
},
addr
:
{
sl
:
'#addr'
,
v
:
{
reg
:
addressReg
,
errMsg
:
'详细地址不能为空'
}
},
mob
:
{
sl
:
'#mob'
,
v
:
{
reg
:
phoneReg
,
errMsg
:
'您输入的联系电话格式不正确'
}
},
mob1
:
{
sl
:
'#mob'
,
v
:
{
reg
:
/^
(
13
[
0-9
]
|15
[
012356789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9, *
]{8}
$/
,
errMsg
:
'您输入的联系电话格式不正确'
}
}
};
lazyLoad
(
$
(
'.banner-img'
));
// 添加.check方法
require
(
'../plugins/check'
);
// 个人中心共用代码加载
require
(
'./me'
);
function
setActive
(
$item
)
{
var
color
=
$item
.
find
(
'.color-text'
).
data
(
'color'
);
var
size
=
$item
.
find
(
'.size-text'
).
data
(
'size'
);
var
$colorList
=
$item
.
find
(
'.color-list'
);
var
$sizeList
=
$item
.
find
(
'.size-list'
);
var
activeIndex
=
0
;
$colorList
.
find
(
'.img-box'
).
each
(
function
(
i
,
box
)
{
var
$box
=
$
(
box
);
if
(
$box
.
find
(
'img'
).
data
(
'color'
)
===
color
)
{
$colorList
.
find
(
'.img-box'
).
eq
(
i
).
addClass
(
'active'
);
activeIndex
=
i
;
return
false
;
}
});
$sizeList
=
$sizeList
.
eq
(
activeIndex
).
removeClass
(
'hide'
);
$sizeList
.
find
(
'span'
).
each
(
function
(
i
,
s
)
{
var
$size
=
$
(
s
);
if
(
$size
.
data
(
'size'
)
===
size
)
{
$sizeList
.
find
(
'span'
).
eq
(
i
).
addClass
(
'active'
);
}
});
}
function
renderList
(
data
)
{
var
cTpl
;
var
sTpl
;
var
$el
=
$
(
'.goods-container'
);
var
resultId
;
var
resultSkn
;
if
(
data
)
{
resultId
=
data
.
productId
;
resultSkn
=
data
.
productSkn
;
$el
.
each
(
function
(
index
,
item
)
{
var
$item
=
$
(
item
);
var
id
=
$item
.
data
(
'id'
);
var
skn
=
$item
.
data
(
'skn'
);
var
$form
;
if
(
id
===
resultId
&&
skn
===
resultSkn
)
{
$form
=
$item
.
closest
(
'.table-body'
).
next
(
'.form'
);
if
(
!
$form
.
find
(
'.color-list'
).
length
)
{
cTpl
=
colorTpl
(
data
);
sTpl
=
sizeTpl
(
data
);
$form
.
find
(
'.group.color'
).
append
(
cTpl
);
$form
.
find
(
'.group.size'
).
append
(
sTpl
);
setActive
(
$form
);
}
}
});
}
}
function
bindColorEvent
()
{
$
(
'.color-list img'
).
off
(
'clice'
).
on
(
'click'
,
function
()
{
var
$this
=
$
(
this
);
var
$sizeList
=
$this
.
closest
(
'.group'
).
next
(
'.group'
).
find
(
'.size-list'
);
var
index
=
$this
.
data
(
'index'
);
var
colorId
=
$this
.
data
(
'color'
);
var
colorText
=
$this
.
attr
(
'alt'
);
var
$c
=
$this
.
closest
(
'.group.color'
).
find
(
'.color-text'
);
$
(
'.size-list .active'
).
removeClass
(
'active'
);
$c
.
text
(
colorText
);
$c
.
attr
(
'data-color'
,
colorId
);
$this
.
closest
(
'.color-list'
).
find
(
'.active'
).
removeClass
(
'active'
);
$this
.
parent
().
addClass
(
'active'
);
$sizeList
.
removeClass
(
'hide'
);
$sizeList
.
addClass
(
'hide'
);
$sizeList
.
eq
(
index
).
removeClass
(
'hide'
);
});
}
function
initSizeId
()
{
var
s
=
$
(
'.size-list:not("hide")'
).
find
(
'span'
).
eq
(
0
).
data
(
'size'
);
$
(
'.group.size .size-text'
).
eq
(
0
).
attr
(
'data-size'
,
s
);
}
function
bindSizeEvent
()
{
$
(
'.size-list span'
).
off
(
'click'
).
on
(
'click'
,
function
()
{
var
$this
=
$
(
this
);
var
s
=
$this
.
text
();
var
id
=
$this
.
data
(
'size'
);
var
$s
=
$this
.
closest
(
'.group.size'
).
find
(
'.size-text'
);
if
(
$this
.
hasClass
(
'disable'
))
{
return
false
;
}
$this
.
parent
().
find
(
'.active'
).
removeClass
(
'active'
);
$this
.
addClass
(
'active'
);
$s
.
text
(
s
);
$s
.
attr
(
'data-size'
,
id
);
});
}
function
getProductInfo
()
{
var
$el
=
$
(
'.goods-container'
);
$el
.
each
(
function
(
index
,
item
)
{
var
id
=
$
(
item
).
data
(
'id'
);
var
skn
=
$
(
item
).
data
(
'skn'
);
if
(
id
&&
skn
)
{
$
.
ajax
({
url
:
'/me/return/getProductInfo'
,
data
:
{
productId
:
id
,
productSkn
:
skn
}
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
renderList
(
result
.
data
);
initSizeId
();
bindColorEvent
();
bindSizeEvent
();
}
});
}
});
}
function
bindSelectEvent
()
{
$
(
'.exchange-reasons'
).
on
(
'change'
,
function
()
{
var
$op
=
$
(
this
).
find
(
'option:selected'
);
$
(
this
).
attr
(
'data-reason'
,
$op
.
val
());
if
(
$op
.
hasClass
(
'is-special'
))
{
$op
.
closest
(
'.table-body'
).
siblings
(
'.special-reason'
).
show
();
}
else
{
$op
.
closest
(
'.table-body'
).
siblings
(
'.special-reason'
).
hide
();
}
});
}
function
bindTypeEvent
()
{
$
(
'.change-type .type'
).
on
(
'click'
,
function
()
{
$
(
'.change-type .type'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
});
}
function
bindCheckboxEvent
()
{
$
(
'.checkbox-box'
).
check
({
type
:
'checkbox'
,
group
:
'exchange-good'
,
onChange
:
function
(
ele
,
checked
)
{
var
$box
=
$
(
ele
).
closest
(
'.change-info-box'
);
if
(
checked
)
{
$box
.
addClass
(
'will-change'
);
$box
.
find
(
'.form'
).
removeClass
(
'hide'
);
}
else
{
$box
.
removeClass
(
'will-change'
);
$box
.
find
(
'.form'
).
addClass
(
'hide'
);
}
if
(
$
(
'.will-change'
).
length
)
{
$
(
'.btn.disable'
).
removeClass
(
'disable'
);
}
else
{
$
(
'.btn.confirm'
).
addClass
(
'disable'
);
}
}
});
}
function
submitChange
(
d
)
{
$
.
ajax
({
url
:
'/me/return/submitExchange'
,
data
:
d
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
location
.
href
=
'//www.yohoblk.com/me/return/exchange/detail/?orderCode='
+
result
.
data
.
apply_id
;
}
else
{
new
_alert
(
'<h1>'
+
result
.
message
+
'</h1>'
).
show
();
}
}).
fail
(
function
(
err
)
{
console
.
log
(
err
);
new
_alert
(
'<h1>出错了!</h1>'
).
show
();
});
}
function
validateData
()
{
var
$inputs
=
$
(
'.express-info-box .require input'
);
var
pass
=
true
;
$inputs
.
each
(
function
(
idx
,
input
)
{
var
k
=
input
.
id
;
var
v
=
null
;
if
(
k
&&
validateMap
[
k
])
{
v
=
validateMap
[
k
];
if
(
validateMap
[
k
].
sl
===
'#mob'
&&
mobDefault
===
$
(
this
).
val
())
{
v
=
validateMap
.
mob1
;
}
if
(
!
validate
.
start
(
v
.
sl
,
v
.
v
))
{
pass
=
false
;
}
}
});
// 检查地址
if
(
!
validate
.
addr
(
addr
.
getAreaIds
(),
{
el
:
'#city'
,
errMsg
:
'请填写完整的省市区信息'
}))
{
pass
=
false
;
}
return
pass
;
}
function
bindConfirmEvent
()
{
$
(
'.confirm'
).
on
(
'click'
,
function
()
{
var
$changeGood
=
$
(
'.change-info-box.will-change'
);
var
changeGoodsList
=
[];
var
changeData
=
{};
var
$imgs
;
var
imgs
=
[];
if
(
$
(
this
).
hasClass
(
'disable'
))
{
return
false
;
}
if
(
!
validateData
())
{
return
false
;
}
$changeGood
.
each
(
function
(
index
,
good
)
{
var
goodObj
=
{};
var
$good
=
$
(
good
);
var
$c
=
$good
.
find
(
'.goods-container'
);
var
$f
=
$good
.
find
(
'.form'
);
var
$specialReason
=
$good
.
find
(
'.special-reason'
);
$imgs
=
null
;
imgs
=
[];
goodObj
.
product_skn
=
$c
.
data
(
'skn'
);
goodObj
.
product_skc
=
$c
.
data
(
'skc'
);
goodObj
.
product_sku
=
$c
.
data
(
'sku'
);
goodObj
.
last_price
=
$c
.
data
(
'price'
);
goodObj
.
product_id
=
$c
.
data
(
'id'
);
goodObj
.
goods_type
=
$c
.
data
(
'goodsType'
);
goodObj
.
exchange_reason
=
$c
.
find
(
'.exchange-reasons'
).
data
(
'reason'
);
goodObj
.
new_goods_id
=
$f
.
find
(
'.color-list .img-box.active img'
).
data
(
'goodsId'
);
goodObj
.
new_product_sku
=
$f
.
find
(
'.size-list span.active'
).
data
(
'sku'
);
if
(
$specialReason
.
length
&&
$specialReason
.
get
(
0
).
style
.
display
===
'block'
)
{
goodObj
.
remark
=
$specialReason
.
find
(
'.right-content'
).
find
(
'.mark-text'
).
val
();
$imgs
=
$specialReason
.
find
(
'.right-content'
).
find
(
'.thumb-box'
);
if
(
$imgs
.
length
)
{
$imgs
.
each
(
function
(
idx
,
img
)
{
imgs
.
push
(
$
(
img
).
data
(
'img'
));
});
goodObj
.
evidence_images
=
imgs
;
}
}
changeGoodsList
.
push
(
goodObj
);
});
changeData
.
app_type
=
1
;
// BLK的类型规定为1
changeData
.
goods
=
changeGoodsList
;
changeData
.
area_code
=
addr
.
getAreaIds
().
split
(
','
)[
2
];
changeData
.
order_code
=
$
(
'.returns-wrap>.order'
).
data
(
'code'
);
changeData
.
consignee_name
=
$
(
'#user'
).
val
();
changeData
.
address
=
$
(
'#addr'
).
val
();
changeData
.
delivery_tpye
=
$
(
'.change-type .type.active'
).
data
(
'type'
);
changeData
.
mobile
=
$
(
'#mob'
).
val
();
submitChange
(
changeData
);
});
}
function
bindBlurEvent
()
{
$
(
'.express-info-box .require input'
).
on
(
'blur'
,
function
()
{
var
$this
=
$
(
this
);
var
v
=
null
;
if
(
$this
.
val
().
length
>
0
&&
validateMap
[
this
.
id
])
{
v
=
validateMap
[
this
.
id
];
if
(
v
.
sl
===
'#mob'
&&
mobDefault
===
$
(
this
).
val
())
{
v
=
validateMap
.
mob1
;
}
validate
.
start
(
v
.
sl
,
v
.
v
);
}
});
}
function
initAddr
(
areaCode
)
{
addr
=
addrSelector
({
el
:
'#city'
});
if
(
areaCode
)
{
addr
.
setAddress
(
areaCode
.
toString
());
}
}
function
bindImgDeleteEvent
()
{
$
(
'.operation-box .delete'
).
off
(
'click'
).
on
(
'click'
,
function
()
{
var
$thumb
=
$
(
this
).
closest
(
'.thumb-box'
);
var
$t
=
$thumb
.
siblings
(
'.img-up-tip'
);
var
number
=
$
(
this
).
closest
(
'.left.right-content'
).
find
(
'.thumb-box'
).
length
-
1
;
$t
.
text
(
number
+
'/4'
);
$thumb
.
siblings
(
'.img-upload'
).
show
();
$thumb
.
remove
();
});
}
function
doUpload
(
count
,
goodIndex
)
{
var
$el
=
$
(
'*[data-good-index='
+
goodIndex
+
']'
);
if
(
count
<
4
)
{
upload
.
up
({
callback
:
function
(
result
)
{
var
img
;
var
$t
;
var
o
;
var
n
;
if
(
result
.
code
===
200
)
{
n
=
parseInt
(
$el
.
siblings
(
'.thumb-box'
).
length
,
10
);
o
=
{
src
:
result
.
data
};
if
(
result
.
imgs
&&
result
.
imgs
.
length
)
{
o
.
url
=
result
.
imgs
[
0
];
}
img
=
imgBoxTpl
(
o
);
$t
=
$el
.
next
(
'.img-up-tip'
);
$el
.
before
(
img
);
n
+=
1
;
$t
.
text
(
n
+
'/4'
);
bindImgDeleteEvent
();
if
(
n
>=
4
)
{
$el
.
hide
();
}
}
else
{
new
_alert
(
result
.
message
).
show
();
}
}
});
}
}
function
bindUploadEvent
()
{
var
$tip
=
$
(
'.img-up-tip'
);
$tip
.
text
(
'0/4'
);
$
(
'.img-upload'
).
each
(
function
(
index
,
uploadBtn
)
{
$
(
uploadBtn
).
on
(
'click'
,
function
()
{
var
that
=
this
;
var
n
=
parseInt
(
$
(
that
).
siblings
(
'.thumb-box'
).
length
,
10
);
var
goodIndex
=
$
(
that
).
data
(
'good-index'
);
if
(
n
>
4
)
{
return
false
;
}
doUpload
(
n
,
goodIndex
);
});
});
}
function
bindKeyUpEvent
()
{
$
(
'.mark-text'
).
on
(
'keyup'
,
function
()
{
var
$this
=
$
(
this
),
str
=
$
.
trim
(
$this
.
val
());
if
(
str
.
length
>
100
)
{
str
=
str
.
substring
(
0
,
100
);
}
$this
.
val
(
str
);
});
}
function
getChangeType
(
areaCode
)
{
$
.
ajax
({
url
:
'/me/return/getChangeType'
,
data
:
{
areaCode
:
areaCode
}
}).
done
(
function
(
result
)
{
var
changeTypeHtml
=
changeTypeTpl
({
type
:
result
.
data
});
if
(
changeTypeHtml
.
length
)
{
$
(
'.change-type .box-title'
).
after
(
changeTypeHtml
);
bindTypeEvent
();
}
});
}
$
(
document
).
on
(
'ready'
,
function
()
{
var
areaCode
=
$
(
'#city'
).
data
(
'code'
);
getProductInfo
();
getChangeType
(
areaCode
);
initAddr
(
areaCode
);
bindSelectEvent
();
bindCheckboxEvent
();
bindConfirmEvent
();
bindBlurEvent
();
bindUploadEvent
();
bindKeyUpEvent
();
});
...
...
Please
register
or
login
to post a comment