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
李奇
7 years ago
Commit
4de001139bf89887edf567a8815da84eea506f21
2 parents
f1521b26
24870160
master
...
develop
feature/1215
feature/baidu_ocpcapi
feature/captcha
feature/coupon-captcha
feature/delete-verify-code
feature/extend-params
feature/group-6.9.17
feature/group-tab-and-limit
feature/groupTab
feature/limit-uuid-coupon
feature/magazine
feature/payment
feature/phoneCoupon
feature/privacy
feature/refactor_alert
feature/seckill-coupon
feature/shoppingPay
feature/tagPrice
hotfix/11
hotfix/autoopenapp
hotfix/captcha
hotfix/change-xianyu-login
hotfix/couponWebSession
hotfix/fix-shop-product-floor
hotfix/hide-xianyu-yas
hotfix/im
hotfix/login
hotfix/magazine-style
hotfix/ocpc
hotfix/show-collage-price
hotfix/sub-domain
hotfix/uid-undifined-error
release/6.9.17
release/6.9.22
release/6.9.23
release/7.0.1
release/7.1.1
userAgentTest
ys
2019-12-5
0913
0906
0711
0517
Merge branch 'release/6.6' into feature/context-api
Hide whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
565 additions
and
516 deletions
app.js
apps/cart/controllers/buy-now-controller.js
apps/cart/models/order.js
apps/cart/models/pay.js
apps/cart/views/action/buynow/order-ensure.hbs
apps/cart/views/action/order-ensure.hbs
apps/cart/views/action/pay/pay-ali.hbs
apps/channel/controllers/index.js
apps/channel/models/cate.js
apps/channel/views/partial/brand/banner_top.hbs
apps/guang/controllers/detail.js
apps/guang/controllers/guang-new.js
apps/guang/controllers/index.js
apps/guang/models/detail.js
apps/home/controllers/address.js
apps/home/models/family.js
apps/home/models/message.js
apps/home/views/action/address/address-act.hbs
apps/home/views/action/family/coin-mall.hbs
apps/home/views/action/message.hbs
apps/news/controllers/index.js
apps/passport/views/action/back/email-new.hbs
apps/passport/views/action/back/mobile-new.hbs
apps/passport/views/action/login/international-new.hbs
apps/passport/views/action/login/login-new.hbs
apps/passport/views/action/reg/reg-new.hbs
apps/passport/views/action/sms/sms-login-new.hbs
apps/product/controllers/list.js
apps/product/controllers/new-detail.js
apps/product/controllers/new.js
apps/product/models/detail.js
apps/product/models/new-detail.js
apps/product/models/new.js
apps/product/router.js
apps/product/views/action/detail/new/detail.hbs
config/common.js
docker.sh
doraemon/middleware/rewrite.js
doraemon/middleware/seo/seoConfig.js
doraemon/models/footer_tab.js
doraemon/views/layout.hbs
doraemon/views/partial/footer-tab.hbs
doraemon/views/partial/resources/banner-top.hbs
doraemon/views/partial/resources/banner.hbs
doraemon/views/partial/resources/goods-category.hbs
doraemon/views/partial/resources/hot-brands-list.hbs
doraemon/views/partial/resources/hot-category.hbs
doraemon/views/partial/resources/hot-single.hbs
package.json
public/build/webpack.base.config.js
public/build/webpack.dev.config.js
public/build/webpack.dll.indexcss.config.js
public/build/webpack.prod.config.js
public/build/webpack.sw.config.js
public/hbs/product/detail/promotion-yoho-coin.hbs
public/hbs/product/detail/promotion.hbs
public/js/cart/index/good.js
public/js/cart/order-ensure.js
public/js/cart/order-info.js
public/js/cart/seckill/order-ensure.js
public/js/cart/select-address.page.js
public/js/home/address-act.page.js
public/js/home/family.page.js
public/js/product/new-detail.js
public/js/yoho-app.js
public/scss/cart/_pay-success.css
public/scss/layout/_common.css
public/scss/product/detail/_coin-intro.css
public/scss/product/detail/_detail.css
public/scss/product/detail/detail.page.css
utils/detail-process.js
utils/product-process.js
utils/search-process.js
app.js
View file @
4de0011
...
...
@@ -5,10 +5,6 @@
*/
'use strict'
;
// if (process.env.USE_APM === '1' && process.env.NODE_ENV === 'production') {
// require('oneapm');
// }
const
config
=
require
(
'./config/common'
);
global
.
Promise
=
require
(
'bluebird'
);
...
...
apps/cart/controllers/buy-now-controller.js
View file @
4de0011
...
...
@@ -47,7 +47,7 @@ class BuyNowController {
return
next
();
}
if
(
product_sku
!==
orderInfo
.
product_sku
)
{
if
(
orderInfo
.
product_sku
&&
product_sku
!==
orderInfo
.
product_sku
)
{
orderInfo
=
{};
res
.
clearCookie
(
'buynow_info'
,
actCkOpthn
);
}
...
...
apps/cart/models/order.js
View file @
4de0011
...
...
@@ -10,7 +10,7 @@ class orderModel extends global.yoho.BaseModel {
let
invoices_title
=
false
;
let
invoices_title_personal
=
false
;
let
invoices_type
=
'2'
;
let
addressId
=
orderInfo
.
address
I
d
;
let
addressId
=
orderInfo
.
address
_i
d
;
// 用户手机号处理
if
(
orderInfo
.
receiverMobile
&&
orderInfo
.
isModifyTel
)
{
...
...
apps/cart/models/pay.js
View file @
4de0011
...
...
@@ -428,6 +428,9 @@ class payModel extends global.yoho.BaseModel {
if
(
result
&&
result
[
2
]
&&
result
[
2
].
data
&&
result
[
2
].
data
.
payment_amount
)
{
resu
.
packageTitle
=
_
.
get
(
result
[
3
],
'data.notice'
,
''
);
resu
.
gain_yoho_coin
=
_
.
get
(
result
[
3
],
'data.gain_yoho_coin'
,
0
);
resu
.
growth_value
=
_
.
get
(
result
[
3
],
'data.growth_value'
,
0
);
resu
.
msg
=
_
.
get
(
result
[
3
],
'data.msg'
,
''
);
resu
.
payment
=
result
[
2
].
data
.
payment_amount
;
...
...
apps/cart/views/action/buynow/order-ensure.hbs
View file @
4de0011
...
...
@@ -173,13 +173,6 @@
实付金额
<span>
¥
{{
round
price
2
}}
</span>
</div>
{{#if
returnYohoCoin
}}
<div
class=
"yoho-coin"
>
共返有货币:
{{
yohoCoinNum
}}
个
</div>
{{/if}}
</section>
{{#if
addressInfo
}}
<div
class=
"address-bottom"
>
...
...
apps/cart/views/action/order-ensure.hbs
View file @
4de0011
...
...
@@ -178,13 +178,6 @@
实付金额
<span>
¥
{{
round
price
2
}}
</span>
</div>
{{#if
returnYohoCoin
}}
<div
class=
"yoho-coin"
>
共返有货币:
{{
yohoCoinNum
}}
个
</div>
{{/if}}
</section>
{{#if
addressInfo
}}
<div
class=
"address-bottom"
>
...
...
apps/cart/views/action/pay/pay-ali.hbs
View file @
4de0011
...
...
@@ -28,7 +28,22 @@
<td>
支付宝
</td>
</tr>
{{/if}}
{{#if
gain_yoho_coin
}}
<tr>
<td>
返有货币
</td>
<td>
{{
gain_yoho_coin
}}
</td>
</tr>
{{/if}}
{{#if
growth_value
}}
<tr>
<td>
返成长值
</td>
<td>
{{
growth_value
}}
</td>
</tr>
{{/if}}
</table>
{{#if
msg
}}
<div
class=
"growth-tip"
><span
class=
"iconfont icon-tan"
></span>
{{
msg
}}
</div>
{{/if}}
</div>
<div
class=
"btn-c"
>
<a
href=
"/"
>
随便逛逛
</a>
...
...
@@ -52,4 +67,3 @@
</div>
{{>
home
/
maybe-like
}}
</div>
...
...
apps/channel/controllers/index.js
View file @
4de0011
...
...
@@ -100,7 +100,6 @@ exports.index = (req, res, next) => {
res
.
render
(
'channel-index'
,
{
module
:
'channel'
,
page
:
'index'
,
title
:
'Yoho!Buy 有货'
,
searchUrl
:
helpers
.
urlFormat
(
'/'
,
null
,
'search'
),
pageFooter
:
true
,
channelList
:
result
[
0
].
channelList
,
...
...
apps/channel/models/cate.js
View file @
4de0011
...
...
@@ -6,9 +6,6 @@
'use strict'
;
const
_
=
require
(
'lodash'
);
// const helpers = global.yoho.helpers;
// const utils = require('../../../utils');
const
genderMap
=
{
boys
:
'1,3'
,
girls
:
'2,3'
,
...
...
@@ -39,34 +36,17 @@ module.exports = class extends global.yoho.BaseModel {
// 如果有二级菜单,二级菜单跳转,否则一级菜单跳转
if
(
firstItem
.
sub
&&
firstItem
.
sub
.
length
)
{
_
.
map
(
firstItem
.
sub
,
function
(
secondItem
)
{
// secondItem.url = helpers.urlFormat('/', utils.mapSort({
// sort: _.get(secondItem, 'relation_parameter.sort'),
// sort_name: secondItem.category_name,
// gender: genderMap[key] || ''
// }), 'list');
secondItem
.
url
=
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(secondItem, 'category_id')}`;
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(secondItem, 'category_id')}
.html
`;
});
firstItem
.
sub
.
unshift
({
category_name
:
`全部
$
{
firstItem
.
category_name
}
`
,
// url: helpers.urlFormat('/', utils.mapSort({
// sort: _.get(firstItem, 'relation_parameter.sort'),
// sort_name: firstItem.category_name,
// gender: genderMap[key] || ''
// }), 'list'),
url
:
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}?title=${firstItem.category_name}` // eslint-disable-line
url
:
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}.html?title=${firstItem.category_name}` // eslint-disable-line
});
}
else
{
// firstItem.url = helpers.urlFormat('/', utils.mapSort({
// sort: _.get(firstItem, 'relation_parameter.sort'),
// sort_name: firstItem.category_name,
// gender: genderMap[key] || ''
// }), 'list');
firstItem
.
url
=
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}`;
`
//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}
.html
`;
}
});
});
...
...
apps/channel/views/partial/brand/banner_top.hbs
View file @
4de0011
...
...
@@ -5,13 +5,13 @@
{{#if
@first
}}
<li
class=
"swiper-slide buriedpoint"
data-bp-id=
"shop_bannerarea_
{{
url
}}
_0"
>
<a
href=
"
{{
url
}}
"
>
<img
src=
"
{{
image2
img
q
=
60
}}
"
>
<img
src=
"
{{
image2
img
q
=
60
}}
"
alt=
"banner轮播图"
>
</a>
</li>
{{^}}
<li
class=
"swiper-slide buriedpoint"
data-bp-id=
"shop_bannerarea_two_0"
>
<a
href=
"
{{
url
}}
"
>
<img
class=
"swiper-lazy"
data-src=
"
{{
image2
img
q
=
60
}}
"
>
<img
class=
"swiper-lazy"
data-src=
"
{{
image2
img
q
=
60
}}
"
alt=
"banner轮播图"
>
</a>
</li>
{{/if}}
...
...
apps/guang/controllers/detail.js
View file @
4de0011
...
...
@@ -274,19 +274,20 @@ const index = (req, res, next) => {
let
shareInfo
=
_shareInfo
(
id
,
detail
.
getArticle
);
Object
.
assign
(
guang
,
shareInfo
);
data
.
title
=
detail
.
getArticle
.
article_title
+
'
-YOHO!BUY 有货网
'
;
data
.
title
=
detail
.
getArticle
.
article_title
+
'
_潮流资讯-YOHO!BUY 有货
'
;
data
.
title_more
=
true
;
data
.
description
=
detail
.
getArticle
.
descriptionText
;
data
.
description
=
detail
.
getArticle
.
descriptionText
&&
detail
.
getArticle
.
descriptionText
.
slice
(
0
,
100
)
;
data
.
description_more
=
true
;
}
if
(
detail
.
getArticle
.
article_title
)
{
parameter
.
tltle
=
detail
.
getArticle
.
article_title
+
'
-YOHO!BUY 有货网
'
;
parameter
.
tltle
=
detail
.
getArticle
.
article_title
+
'
_潮流资讯-YOHO!BUY 有货
'
;
parameter
.
keywords
=
detail
.
getArticle
.
article_title
;
}
if
(
detail
.
getArticle
.
descriptionText
)
{
parameter
.
description
=
detail
.
getArticle
.
descriptionText
;
parameter
.
description
=
detail
.
getArticle
.
descriptionText
&&
detail
.
getArticle
.
descriptionText
.
slice
(
0
,
100
);
}
// 标识有微信分享
...
...
apps/guang/controllers/guang-new.js
View file @
4de0011
...
...
@@ -25,8 +25,8 @@ exports.index = (req, res, next) => {
pageHeader
:
headerModel
.
setNav
({
navTitle
:
'有货逛不停'
}),
title
:
'逛潮流,最新原创潮流资讯 | YOHO!BUY有货'
,
keywords
:
'潮流资讯,潮流文章,有货潮流分享'
,
title
:
'潮流资讯,最新原创潮流时尚资讯-YOHO!BUY 有货'
,
keywords
:
'潮流资讯,时尚潮流资讯'
,
description
:
'来有货玩潮流,潮流资讯大分享!年轻人潮流购物中心,了解潮流趋势、掌握潮流文化知识信息,尽在有货逛潮流!'
,
module
:
'guang'
,
page
:
'guang-new'
,
...
...
apps/guang/controllers/index.js
View file @
4de0011
...
...
@@ -23,27 +23,27 @@ const channels = {
const
listTDK
=
{
0
:
{
title
:
'最新潮流
文章,逛最新潮流资讯-YOHO!BUY 有货网
'
,
title
:
'最新潮流
资讯-YOHO!BUY 有货
'
,
keywords
:
'最新潮流文章,潮流资讯,逛潮流'
,
description
:
'有货网每天提供全球最新最潮的潮流文章资讯,宣传潮流商品,潮流文化,潮流品牌等信息,想更多了解潮流最新资讯就来有货网!'
},
// 最新
1001
:
{
title
:
'
高人气潮流文章,逛人气潮流资讯-YOHO!BUY 有货网
'
,
title
:
'
人气潮流资讯-YOHO!BUY 有货
'
,
keywords
:
'人气潮流文章,潮流人气,逛潮流人气'
,
description
:
'有货网每天提供全球人气最高的潮流文章资讯,宣传潮流商品,潮流文化,潮流品牌等信息,想更多了解高人气潮流资讯就来有货网!'
},
// 人气
2
:
{
title
:
'
各种潮流搭配,逛潮流搭配资讯-YOHO!BUY 有货网
'
,
title
:
'
潮流搭配_潮流资讯-YOHO!BUY 有货
'
,
keywords
:
'搭配潮流文章,潮流搭配'
,
description
:
'有货网每天提供全球最新最潮的潮流搭配文章资讯,宣传潮流商品,潮流文化,潮流品牌等信息,想更多了解学习潮流搭配资讯就来有货网!'
},
// 搭配
4
:
{
title
:
'潮流品牌
,逛各种潮流品牌资讯-YOHO!BUY 有货网
'
,
title
:
'潮流品牌
_潮流资讯-YOHO!BUY 有货
'
,
keywords
:
'逛潮品,潮流潮品,潮品资讯'
,
description
:
'有货网每天提供全球最新最潮的潮流潮品文章资讯,宣传潮流商品,潮流文化,潮流品牌等信息,想更多了解学习潮流潮品资讯就来有货网!'
},
// 潮品
22
:
{
title
:
'
潮流视频,欣赏最新最好玩的潮流视频-YOHO!BUY 有货网
'
,
title
:
'
Buy TV潮流视频_潮流资讯-YOHO!BUY 有货
'
,
keywords
:
'潮流视频,看潮流'
,
description
:
'有货网每天提供全球最新最潮最精彩的潮流视频,宣传潮流商品,潮流文化,潮流品牌等信息,想更多欣赏潮流视频就来有货网!'
}
// 视频
...
...
apps/guang/models/detail.js
View file @
4de0011
...
...
@@ -433,6 +433,9 @@ class DetailModel extends global.yoho.BaseModel {
page
:
params
.
page
,
limit
:
params
.
limit
||
20
,
udid
:
params
.
udid
},
param
:
{
cache
:
true
}
}).
then
(
result
=>
{
return
_
.
get
(
result
,
'data.list'
,
[]);
...
...
apps/home/controllers/address.js
View file @
4de0011
...
...
@@ -61,6 +61,8 @@ exports.addressJson = (req, res, next) => {
* @param next
*/
exports
.
addressAct
=
(
req
,
res
,
next
)
=>
{
let
saveAndUse
=
req
.
query
.
refer
===
'shopping'
||
req
.
query
.
refer
===
'buynow'
;
req
.
ctx
(
addressModel
).
address
({
id
:
req
.
query
.
id
?
req
.
query
.
id
:
null
,
uid
:
req
.
user
.
uid
...
...
@@ -75,7 +77,8 @@ exports.addressAct = (req, res, next) => {
navBtn
:
false
,
backUrl
:
false
}),
title
:
result
&&
result
.
navTitle
title
:
result
&&
result
.
navTitle
,
saveAndUse
:
saveAndUse
};
res
.
render
(
'address/address-act'
,
Object
.
assign
(
responseData
,
result
));
...
...
@@ -100,8 +103,6 @@ exports.newGetAddress = (req, res, next) => {
* @param next
*/
exports
.
saveAddress
=
(
req
,
res
,
next
)
=>
{
/* 没有用户,返回 */
if
(
!
req
.
user
.
uid
)
{
return
res
.
json
({
code
:
400
,
...
...
@@ -109,7 +110,6 @@ exports.saveAddress = (req, res, next) => {
});
}
/* 没有地址信息,返回 */
if
(
!
req
.
body
.
address
)
{
return
res
.
json
({
code
:
401
,
...
...
@@ -117,7 +117,6 @@ exports.saveAddress = (req, res, next) => {
});
}
/* 没有地区码,返回 */
if
(
!
req
.
body
.
area_code
)
{
return
res
.
json
({
code
:
402
,
...
...
@@ -125,7 +124,6 @@ exports.saveAddress = (req, res, next) => {
});
}
/* 没有收件人姓名,返回 */
if
(
!
req
.
body
.
consignee
)
{
return
res
.
json
({
code
:
403
,
...
...
@@ -133,14 +131,6 @@ exports.saveAddress = (req, res, next) => {
});
}
/* 邮箱地址校验不通过,返回 */
// if (!req.body.email || !helpers.verifyEmail(req.body.email)) {
// return res.json({
// code: 404,
// message: '输入的邮箱地址格式不正确'
// });
// }
req
.
ctx
(
addressModel
).
saveAddress
({
uid
:
req
.
user
.
uid
,
address
:
req
.
body
.
address
,
...
...
@@ -255,4 +245,3 @@ exports.chooseAddress = (req, res, next) => {
res
.
json
(
result
);
}).
catch
(
next
);
};
...
...
apps/home/models/family.js
View file @
4de0011
...
...
@@ -443,7 +443,7 @@ class familyModel extends global.yoho.BaseModel {
integralCharts
(
uid
)
{
let
options
=
{
data
:
{
method
:
'app.
family.userc
oin'
,
method
:
'app.
passport.yohofamilyC
oin'
,
uid
:
uid
},
param
:
{
...
...
@@ -463,9 +463,7 @@ class familyModel extends global.yoho.BaseModel {
return
b
.
proportion
-
a
.
proportion
;
});
if
(
integralData
.
total
)
{
chartsData
.
total
=
parseInt
(
result
.
data
.
total
,
10
)
<
99999
?
result
.
data
.
total
:
'99999+'
;
}
chartsData
.
total
=
parseInt
(
result
.
data
.
total
,
10
)
<
99999
?
result
.
data
.
total
:
'99999+'
;
_
.
forEach
(
integralData
.
data
,
function
(
data
)
{
list
.
push
({
...
...
@@ -550,12 +548,12 @@ class familyModel extends global.yoho.BaseModel {
getCoinData
(
params
)
{
let
options
=
{
data
:
{
method
:
'app.
family.coinlog
'
,
method
:
'app.
yohocoin.lists
'
,
uid
:
params
.
uid
,
source
:
params
.
source
||
-
1
,
queryType
:
params
.
queryType
||
0
,
beginTime
:
params
.
beginTime
?
this
.
formatDay
(
parseInt
(
params
.
beginTime
,
10
))
:
''
,
endTime
:
params
.
endTime
?
this
.
formatDay
(
parseInt
(
params
.
endTime
,
10
))
:
''
,
endTime
:
params
.
endTime
?
this
.
formatDay
(
parseInt
(
params
.
endTime
,
10
)
+
86400
*
1000
)
:
''
,
page
:
params
.
page
||
1
,
limit
:
params
.
limit
||
10
},
...
...
@@ -570,14 +568,15 @@ class familyModel extends global.yoho.BaseModel {
};
let
_this
=
this
;
if
(
_
.
get
(
result
,
'data.data'
))
{
_
.
forEach
(
result
.
data
.
data
,
function
(
val
)
{
if
(
_
.
has
(
result
,
'data.coinlist'
))
{
_
.
forEach
(
_
.
get
(
result
,
'data.coinlist'
,
[]),
function
(
val
)
{
Object
.
assign
(
val
,
{
typeName
:
_this
.
checkType
(
val
.
iconType
),
minus
:
parseInt
(
val
.
num
,
10
)
<
0
});
});
resu
.
coinList
=
result
.
data
.
data
;
resu
.
coinList
=
_
.
get
(
result
,
'data.coinlist'
,
[]);
}
return
resu
;
...
...
@@ -790,7 +789,7 @@ class familyModel extends global.yoho.BaseModel {
}
if
(
parseInt
(
val
.
exchangeEndTime
,
10
)
!==
0
&&
parseInt
(
val
.
exchangeStartTime
,
10
)
!==
0
)
{
if
(
parseInt
(
Date
.
now
(),
10
)
>
parseInt
(
val
.
exchangeEndTime
,
10
)
||
parseInt
(
Date
.
now
(),
10
)
<
parseInt
(
val
.
exchangeStartTime
,
10
))
{
// eslint-disable-line
if
(
parseInt
(
Date
.
now
(),
10
)
/
1000
>
parseInt
(
val
.
exchangeEndTime
,
10
)
||
parseInt
(
Date
.
now
(),
10
)
/
1000
<
parseInt
(
val
.
exchangeStartTime
,
10
))
{
// eslint-disable-line
val
.
noStore
=
true
;
}
}
...
...
@@ -805,7 +804,7 @@ class familyModel extends global.yoho.BaseModel {
coinMall
(
params
)
{
let
options
=
{
data
:
{
method
:
'app.
family.totalcoin
'
,
method
:
'app.
yohocoin.total
'
,
uid
:
params
.
uid
},
param
:
{
...
...
apps/home/models/message.js
View file @
4de0011
// 消息 by acgpiano
'use strict'
;
const
_
=
require
(
'lodash'
);
const
moment
=
require
(
'moment'
);
const
helpers
=
global
.
yoho
.
helpers
;
...
...
@@ -40,7 +41,7 @@ class messageModel extends global.yoho.BaseModel {
// name: item.body.name,
// collarTime: item.body.collar_time,
// useTime: item.body.use_time
,
content
:
_
.
get
(
item
,
'body.content'
,
''
)
,
isCollar
:
item
.
body
.
is_collar
===
'Y'
?
true
:
false
,
isOverTime
:
item
.
body
.
is_over_time
===
'Y'
?
true
:
false
});
...
...
apps/home/views/action/address/address-act.hbs
View file @
4de0011
...
...
@@ -21,11 +21,9 @@
详细地址:
<textarea
name=
"address"
maxlength=
"255"
>
{{
address
.
address
}}
</textarea>
</label>
</form>
<div
class=
"submit"
>
确认
保存
{{#if
saveAndUse
}}
并使用
{{/if}}
</div>
</div>
<div
class=
"my-address-list-page page-wrap hide"
>
...
...
apps/home/views/action/family/coin-mall.hbs
View file @
4de0011
<div
class=
"coin-mall-c"
>
<div
class=
"coin
{{#if
isNowApp
}}
now
{{/if}}
"
>
<span>
{{
coinNum
}}
</span>
<span>
{{
total
}}
</span>
</div>
<div
class=
"btn-c"
>
<a
class=
"acquiring-help"
href=
'https://m.yohobuy.com/activity/feature/905.html?share_id=3111&title=YOHO!FAMILY积分说明&openby:yohobuy={"action":"go.h5","params":{"url":"https://m.yohobuy.com/activity/feature/905.html?share_id=3111&title=YOHO!FAMILY积分说明"}}'
>
如何获取积分
</a>
...
...
@@ -24,4 +24,4 @@
</div>
<div
class=
"tip-app hide"
>
</div>
</div>
\ No newline at end of file
</div>
...
...
apps/home/views/action/message.hbs
View file @
4de0011
...
...
@@ -7,7 +7,7 @@
{{/if}}
<p>
{{#if
birthType
}}
<a>
亲爱的,这是我给您的生日专属礼
</a>
<a>
{{
title
}}
</a>
{{else}}
<a
href=
"//m.yohobuy.com/home/messageDetail?id=
{{
id
}}
"
>
{{
title
}}
</a>
{{/if}}
...
...
@@ -15,19 +15,7 @@
{{#if
birthType
}}
<div
class=
"ticket-pic"
>
<img
src=
"
{{
imgSrc
'img/home/employ/birth-card.png'
}}
"
/>
</div>
<div
class=
"ticket-btn"
>
<div
class=
"ticket-btn-c"
>
<div>
{{#if
isOverTime
}}
<a
class=
"disable"
>
已过期
</a>
{{else
if
isCollar
}}
<a
class=
"disable"
>
已领取
</a>
{{else}}
<a
href=
"//m.yohobuy.com/home/birthCoupon"
>
立即领取
</a>
{{/if}}
</div>
</div>
<div
class=
"content"
>
{{
content
}}
</div>
</div>
{{/if}}
<span>
{{
time
}}
</span>
...
...
apps/news/controllers/index.js
View file @
4de0011
...
...
@@ -19,7 +19,7 @@ exports.index = (req, res, next) => {
}
return
res
.
render
(
'news-index'
,
Object
.
assign
({
title
:
'资讯
| '
+
(
res
.
locals
.
title
||
''
)
,
title
:
'资讯
_潮流资讯-YOHO!BUY 有货'
,
pageHeader
:
headerModel
.
setNav
({
navTitle
:
'资讯'
}),
...
...
apps/passport/views/action/back/email-new.hbs
View file @
4de0011
<div
class=
"back-email-new-page"
>
<div
class=
"top-operation-bar"
>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
>

</button>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
type=
"button"
>

</button>
<span
class=
"page-title"
>
邮箱找回密码
</span>
</div>
<
div
class=
"back-email-form"
>
<
form
class=
"back-email-form"
>
<div
class=
"form-group email"
>
<label
for=
"email"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"email"
placeholder=
"请输入邮箱"
><i
id=
"clearEmail"
class=
"iconfont clear hide"
>

</i>
</div>
<button
id=
"backEmailResetBtn"
class=
"back-email-reset-btn"
>
确 认
</button>
</div>
<button
id=
"backEmailResetBtn"
class=
"back-email-reset-btn"
type=
"button"
>
确 认
</button>
</form>
</div>
...
...
apps/passport/views/action/back/mobile-new.hbs
View file @
4de0011
<div
class=
"back-mobile-new-page"
>
<div
class=
"top-operation-bar"
>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
>

</button>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
type=
"button"
>

</button>
<span
class=
"page-title"
>
手机找回密码
</span>
</div>
<
div
class=
"back-mobile-form"
>
<
form
class=
"back-mobile-form"
>
<div
class=
"form-group mobile"
>
<label
for=
"mobile"
class=
"iconfont"
>

</label>
<select
name=
""
id=
"countryCodeSelector"
class=
"country-select"
>
...
...
@@ -16,12 +16,12 @@
class=
"iconfont clear hide"
>

</i>
</div>
<div
class=
"form-group verify-code"
>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
class=
"verify-code-input"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
>
获取验证码
</button>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
class=
"verify-code-input"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
type=
"button"
>
获取验证码
</button>
</div>
<div
class=
"form-group password"
>
<label
for=
"password"
class=
"iconfont"
>

</label><input
type=
"password"
name=
"password"
placeholder=
"请重置新密码"
><span
id=
"passwordEyeIcon"
class=
"eye"
><i
class=
"iconfont eye-close"
>

</i><i
class=
"iconfont eye-open hide"
>

</i></span>
</div>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"backMobileResetBtn"
class=
"back-mobile-reset-btn"
>
重置登录密码
</button>
</div>
</div>
\ No newline at end of file
<button
id=
"backMobileResetBtn"
class=
"back-mobile-reset-btn"
type=
"button"
>
重置登录密码
</button>
</form>
</div>
...
...
apps/passport/views/action/login/international-new.hbs
View file @
4de0011
<div
class=
"international-new-page"
>
<div
class=
"top-operation-bar"
>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
>

</button>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
type=
"button"
>

</button>
<span
class=
"page-title"
>
海外账号登录
</span>
</div>
<
div
class=
"international-form"
>
<
form
class=
"international-form"
>
<div
class=
"form-group mobile"
>
<label
for=
"mobile"
class=
"iconfont"
>

</label>
<select
name=
""
id=
"countryCodeSelector"
class=
"country-select"
>
...
...
@@ -21,6 +21,6 @@
id=
"passwordEyeIcon"
class=
"eye"
><i
class=
"iconfont eye-close"
>

</i><i
class=
"iconfont eye-open hide"
>

</i></span>
</div>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"internationalLoginBtn"
class=
"international-login-btn"
>
登录
</button>
</div>
</div>
\ No newline at end of file
<button
id=
"internationalLoginBtn"
class=
"international-login-btn"
type=
"button"
>
登录
</button>
</form>
</div>
...
...
apps/passport/views/action/login/login-new.hbs
View file @
4de0011
...
...
@@ -3,13 +3,13 @@
<img
src=
"
{{
image2
banner
w
=
750
h
=
290
}}
"
>
<div
class=
"banner-info"
>
<div
class=
"top-operation-bar"
>
<button
class=
"close iconfont"
onclick=
"location.href='
{{
backUrl
}}
'"
>

</button>
<button
class=
"close iconfont"
onclick=
"location.href='
{{
backUrl
}}
'"
type=
"button"
>

</button>
<a
href=
"
{{
registerUrl
}}
"
class=
"register"
>
注册
</a>
</div>
<div
class=
"tip"
>
Yoho!Family账号可登录Yoho!Buy有货
<i
id=
"showYohoFamilyTip"
class=
"iconfont"
>

</i></div>
</div>
</div>
<
div
class=
"login-form"
>
<
form
class=
"login-form"
>
<div
class=
"form-group username"
>
<label
for=
"username"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"username"
placeholder=
"请输入手机号/邮箱"
>
<i
id=
"clearUsrname"
class=
"iconfont clear hide"
>

</i>
...
...
@@ -19,13 +19,13 @@
<span
id=
"passwordEyeIcon"
class=
"eye"
><i
class=
"iconfont eye-close"
>

</i><i
class=
"iconfont eye-open hide"
>

</i></span>
</div>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"loginBtn"
class=
"login-btn disable"
>
登录
</button>
<button
id=
"loginBtn"
class=
"login-btn disable"
type=
"button"
>
登录
</button>
<div
class=
"other-info"
>
<a
href=
"
{{
internationalUrl
}}
"
>
海外账号登录
</a>
<a
href=
"
{{
smsLoginUrl
}}
"
>
手机验证码登录
</a>
<a
id=
"getPswrdBtn"
href=
"javascript:void(0);"
>
忘记密码?
</a>
</div>
</
div
>
</
form
>
{{!-- <div class="third-party-login">
<div class="tip-box">
<span class="left-line"></span>
...
...
apps/passport/views/action/reg/reg-new.hbs
View file @
4de0011
<div
class=
"reg-new-page"
>
<div
class=
"top-operation-bar"
>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
>

</button>
<button
class=
"back iconfont"
onclick=
"javascript:history.go(-1);"
type=
"button"
>

</button>
<span
class=
"page-title"
>
注册
</span>
</div>
<
div
class=
"reg-form"
>
<
form
class=
"reg-form"
>
<div
class=
"form-group mobile"
>
<label
for=
"mobile"
class=
"iconfont"
>

</label>
<select
name=
""
id=
"countryCodeSelector"
class=
"country-select"
>
...
...
@@ -17,7 +17,7 @@
</div>
<div
class=
"form-group verify-code"
>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
class=
"verify-code-input"
autocomplete=
"off"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
>
获取验证码
</button>
class=
"verify-code-input"
autocomplete=
"off"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
type=
"button"
>
获取验证码
</button>
</div>
<div
class=
"form-group password"
>
<label
for=
"password"
class=
"iconfont"
>

</label><input
type=
"password"
name=
"password"
placeholder=
"请输入密码"
autocomplete=
"off"
>
...
...
@@ -29,10 +29,10 @@
</div>
<input
name=
"token"
type=
"hidden"
value=
"
{{
token
}}
"
>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"regBtn"
class=
"reg-btn"
>
注册
</button>
<button
id=
"regBtn"
class=
"reg-btn"
type=
"button"
>
注册
</button>
<div
class=
"protocol"
>
<span
class=
"iconfont checkbox icon-cb-radio"
></span>
我已阅读并同意遵守
<a
href=
"/service/qaDetail?keyword=服务条款&sonId=197"
title=
"Yoho!Buy有货服务条款"
target=
"_blank"
>
Yoho!Buy有货服务条款
</a>
</div>
</div>
</div>
\ No newline at end of file
</form>
</div>
...
...
apps/passport/views/action/sms/sms-login-new.hbs
View file @
4de0011
...
...
@@ -3,13 +3,13 @@
<img
src=
"
{{
image2
banner
w
=
750
h
=
290
}}
"
>
<div
class=
"banner-info"
>
<div
class=
"top-operation-bar"
>
<button
class=
"close iconfont"
onclick=
"location.href='
{{
backUrl
}}
'"
>

</button>
<button
class=
"close iconfont"
onclick=
"location.href='
{{
backUrl
}}
'"
type=
"button"
>

</button>
<a
href=
"
{{
registerUrl
}}
"
class=
"register"
>
注册
</a>
</div>
<div
class=
"tip"
>
Yoho!Family账号可登录Yoho!Buy有货
<i
id=
"showYohoFamilyTip"
class=
"iconfont"
>

</i></div>
</div>
</div>
<
div
class=
"sms-login-form"
>
<
form
class=
"sms-login-form"
>
<div
class=
"form-group mobile"
>
<label
for=
"mobile"
class=
"iconfont"
>

</label>
<select
name=
""
id=
"countryCodeSelector"
class=
"country-select"
>
...
...
@@ -23,10 +23,10 @@
</div>
<div
class=
"form-group verify-code"
>
<label
for=
"verifyCode"
class=
"iconfont"
>

</label><input
type=
"text"
name=
"verifyCode"
placeholder=
"请输入验证码"
class=
"verify-code-input"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
>
获取验证码
</button>
class=
"verify-code-input"
><button
id=
"getVerifyCodeBtn"
class=
"get-verify-code"
type=
"button"
>
获取验证码
</button>
</div>
<div
data-userverify=
"
{{
captchaShow
}}
"
data-geetest=
"
{{
useGeetest
}}
"
id=
"js-img-check"
{{#
unless
useGeetest
}}
class=
"full-img-verify"
{{/
unless
}}
></div>
<button
id=
"smsLoginBtn"
class=
"sms-login-btn"
>
登录
</button>
<button
id=
"smsLoginBtn"
class=
"sms-login-btn"
type=
"button"
>
登录
</button>
<div
class=
"other-info"
>
{{#if
openPassword
}}
<a
href=
"
{{
internationalUrl
}}
"
>
海外账号登录
</a>
...
...
@@ -34,7 +34,7 @@
{{/if}}
<a
id=
"getPswrdBtn"
href=
"javascript:void(0);"
>
忘记密码?
</a>
</div>
</
div
>
</
form
>
{{!-- <div class="third-party-login">
<div class="tip-box">
<span class="left-line"></span>
...
...
apps/product/controllers/list.js
View file @
4de0011
...
...
@@ -217,82 +217,6 @@ const shopFav = (req, res) => {
};
/**
* 旧版品类落地页
* TODO 已重构为 listNew 待删除
*/
const
category
=
(
req
,
res
,
next
)
=>
{
if
(
req
.
query
)
{
_
.
forEach
(
req
.
query
,
(
perParam
,
index
)
=>
{
req
.
query
[
index
]
=
stringProcess
.
paramsFilter
(
perParam
);
});
}
let
params
=
Object
.
assign
({},
req
.
query
);
let
seoTitle
;
if
(
req
.
query
.
title
||
req
.
query
.
sort_name
)
{
seoTitle
=
stringProcess
.
decodeURIComponent
(
req
.
query
.
title
||
req
.
query
.
sort_name
);
}
/* 勿修改,唤起 APP 使用 */
let
appParams
=
Object
.
assign
({},
req
.
query
,
{
title
:
req
.
query
.
title
||
req
.
query
.
sort_name
||
''
,
productPool
:
req
.
query
.
filter_poolId
,
actiontype
:
req
.
query
.
actiontype
||
'1'
});
delete
appParams
.
filter_poolId
;
let
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.list","params":'
+
JSON
.
stringify
(
appParams
)
+
'}'
;
let
uid
=
req
.
user
.
uid
||
0
;
// 获取第一页数据做服务端渲染
let
initialData
=
_
.
assign
({
gender
:
params
.
gender
,
sort
:
parseInt
(
params
.
sort
,
10
)
||
''
,
type
:
'default'
,
order
:
'0'
,
page
:
1
,
limit
:
24
,
isApp
:
params
.
app_version
},
params
);
if
(
uid
)
{
initialData
.
uid
=
uid
;
}
req
.
ctx
(
searchModel
).
getSearchData
(
initialData
).
then
((
firstPageGoods
)
=>
{
res
.
render
(
'search/goods-list'
,
Object
.
assign
({
_noLazy
:
true
,
// 首屏不使用lazyload
module
:
'product'
,
page
:
'search-list'
,
// canonical: {
// currentHref: 'https://www.yohobuy.com/list?' // TODO
// },
pageHeader
:
headerModel
.
setNav
({
navTitle
:
seoTitle
||
'商品列表'
}),
goodList
:
params
,
firstPageGoods
:
firstPageGoods
||
[],
suggestion
:
firstPageGoods
.
suggestion
||
[],
showDownloadApp
:
true
,
pageFooter
:
true
,
category
:
true
,
localCss
:
true
,
appPath
:
appPath
,
introText
:
req
.
query
.
intro_text
},
searchProcess
.
getListSeoData
({
gender
:
req
.
query
.
gender
,
sort_name
:
seoTitle
})));
}).
catch
(
next
);
};
/**
* 品类落地页 SEO 友好的新路由
*/
const
listNew
=
(
req
,
res
,
next
)
=>
{
...
...
@@ -670,7 +594,6 @@ const getBrandCouponsList = (req, res, next) => {
};
module
.
exports
=
{
category
,
brand
,
favoriteBrand
,
shopIntro
,
...
...
apps/product/controllers/new-detail.js
View file @
4de0011
...
...
@@ -58,7 +58,7 @@ const newDetail = {
JSON
.
stringify
(
appParams
)
+
'}'
;
let
title
=
`
【
$
{
result
.
brandName
}
$
{
result
.
sortName
}
】
$
{
result
.
goodsName
}
|
YOHO
!
BUY
有货`
;
let
title
=
`
$
{
result
.
goodsName
}
_$
{
result
.
brandName
}
$
{
result
.
sortName
}
--
YOHO
!
BUY
有货`
;
let
description
=
result
.
goodsName
+
' 有货网仅售'
+
result
.
goodsPrice
.
currentPrice
+
'元,购买'
+
result
.
brandName
+
result
.
sortName
+
',了解'
+
result
.
brandName
+
result
.
sortName
+
'商品信息就上有货网!'
;
...
...
apps/product/controllers/new.js
View file @
4de0011
...
...
@@ -5,6 +5,7 @@
*/
'use strict'
;
const
co
=
Promise
.
coroutine
;
const
mRoot
=
'../models'
;
const
utils
=
'../../../utils'
;
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
...
...
@@ -24,15 +25,6 @@ const channelToAppChannel = (channel) => {
}[
channel
]
||
'1'
;
};
const
channelSeo
=
(
channel
)
=>
{
return
{
boys
:
'男生'
,
girls
:
'女生'
,
kids
:
'潮童'
,
lifestyle
:
'创意生活'
}[
channel
]
||
'男生'
;
};
// 新品到着(blk)
const
blkNewGoods
=
(
req
,
res
,
next
)
=>
{
let
params
=
Object
.
assign
({
...
...
@@ -81,13 +73,37 @@ const newGoods = (req, res, next) => {
// 唤起 APP 的路径
res
.
locals
.
appPath
=
`
yohobuy
:
//yohobuy.com/goapp?openby:yohobuy={"action":"go.new","params":${JSON.stringify(appParams)}}`;
newModel
.
getNewFocus
(
channel
).
then
((
result
)
=>
{
let
seoTitle
=
'【潮流新品】_引领潮流_2018时尚潮流新品-YOHO!BUY 有货'
;
co
(
function
*
()
{
let
apiRequest
=
[
newModel
.
getNewFocus
(
channel
)
];
let
paramsForSeo
=
_
.
assign
({},
req
.
query
);
delete
paramsForSeo
.
pathParams
;
delete
paramsForSeo
[
0
];
delete
paramsForSeo
.
channel
;
if
(
!
_
.
isEmpty
(
paramsForSeo
))
{
apiRequest
.
push
(
newModel
.
filterDataApi
(
paramsForSeo
));
}
let
[
result
,
filterResultApi
]
=
yield
Promise
.
all
(
apiRequest
);
if
(
filterResultApi
)
{
let
seoParams
=
searchProcess
.
getFilterValueForSeo
(
paramsForSeo
,
_
.
get
(
filterResultApi
,
'data'
,
{}));
let
seoRenderData
=
searchProcess
.
getListSeoData
(
seoParams
,
true
);
seoTitle
=
seoRenderData
.
title
;
}
res
.
render
(
'new/new'
,
{
module
:
'product'
,
page
:
'new'
,
title
:
channelSeo
(
req
.
yoho
.
channel
)
+
'新品上架,全场正品保证-YOHO!BUY 有货'
,
keywords
:
channelSeo
(
req
.
yoho
.
channel
)
+
'新品,潮流新品,潮流正品'
,
description
:
channelSeo
(
req
.
yoho
.
channel
)
+
'新品上架,正品网购,官方授权!全场品牌正品保证,支持货到付款。 想购买潮流商品就来YOHO! 有货中国大型潮流商品购物网站。'
,
// eslint-disable-line
title
:
seoTitle
,
keywords
:
'潮流新品.引领潮流,2018时尚潮流新品'
,
description
:
'【潮流新品】,2018时尚潮流新品,潮流网购就上YOHO!BUY有货,有货网销售正品新款,全场低至4折,★全场品牌正品保证,支持货到付款!★'
,
// eslint-disable-line
pageHeader
:
headerModel
.
setNav
({
navTitle
:
'新品到着'
}),
...
...
@@ -104,7 +120,7 @@ const newGoods = (req, res, next) => {
pageFooter
:
true
,
showDownloadApp
:
true
});
}).
catch
(
next
);
})
()
.
catch
(
next
);
};
// 301到新路由
...
...
apps/product/models/detail.js
View file @
4de0011
...
...
@@ -775,6 +775,11 @@ module.exports = class extends global.yoho.BaseModel {
};
}
finalResult
.
promYohoCoinText
=
productProcess
.
procPromYohoCoin
(
_
.
get
(
result
,
'vip_return_coin.max_return_coin_info'
,
[]),
params
.
current_vip_level
);
// 2017电子门票不显示区域
// let ticketsProps = finalResult.cartInfo.props;
...
...
apps/product/models/new-detail.js
View file @
4de0011
...
...
@@ -78,6 +78,8 @@ module.exports = class extends global.yoho.BaseModel {
});
finalResult
.
recommendKeywords
=
recomdKeywords
;
finalResult
.
vip_return_coin_info
=
detailProcess
.
processPromYohoCoin
(
_
.
get
(
result
,
'data.vip_return_coin.vip_return_coin_info'
,
[]));
return
finalResult
;
});
...
...
@@ -114,7 +116,6 @@ module.exports = class extends global.yoho.BaseModel {
}
return
Promise
.
all
(
apiArray
).
then
(
info
=>
{
// console.log(info);
let
finalResult
=
{
promotion
:
null
,
enterStore
:
null
,
...
...
@@ -168,14 +169,12 @@ module.exports = class extends global.yoho.BaseModel {
return
this
.
get
({
data
:
params
,
param
:
cacheConf
})
.
then
(
result
=>
{
// console.log(result);
if
(
result
&&
result
.
code
===
200
)
{
return
detailProcess
.
processShopsInfo
(
result
.
data
);
}
return
[];
},
()
=>
[]);
}).
then
(
result
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
detailProcess
.
processShopsInfo
(
result
.
data
);
}
return
[];
},
()
=>
[]);
}
/**
...
...
@@ -194,14 +193,12 @@ module.exports = class extends global.yoho.BaseModel {
return
this
.
get
({
data
:
params
,
param
:
cacheConf
})
.
then
(
result
=>
{
// console.log(result);
if
(
result
&&
result
.
code
===
200
)
{
return
result
.
data
;
}
}).
then
(
result
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
result
.
data
;
}
return
{};
});
return
{};
});
}
};
...
...
apps/product/models/new.js
View file @
4de0011
...
...
@@ -239,5 +239,6 @@ module.exports = {
indexData
,
recbrand
,
reclist
,
reclistFilter
reclistFilter
,
filterDataApi
:
_searchGoods
};
...
...
apps/product/router.js
View file @
4de0011
...
...
@@ -155,9 +155,6 @@ router.get('/search/shop/goods', search.searchShopGoods); // 搜索店铺下的
router
.
get
(
'/list/global(/:pathParams)?'
,
rewrite
.
resolvePathParams
,
globalPro
.
list
);
// 全球购路由重写 全球购列表页
router
.
get
(
'/index/index'
,
rewrite
.
sortParams
,
list
.
category
);
// 旧 品类首页
router
.
get
(
'/list/index'
,
rewrite
.
sortParams
,
list
.
category
);
// 旧 兼容 PC 的链接
router
.
get
(
'/list(/:pathParams)?'
,
rewrite
.
resolvePathParams
,
list
.
listNew
);
// 列表新的 URL
router
.
get
(
'/search/category'
,
cors
,
...
...
apps/product/views/action/detail/new/detail.hbs
View file @
4de0011
...
...
@@ -74,6 +74,9 @@
<div
id=
"placeholder-promotion"
style=
"height:100px;background-color:#fff;"
>
</div>
{{!--占位: 有货币促销--}}
<div
id=
"placeholder-promotion-yohocoin"
></div>
{{!-- 占位: 用户反馈, 店铺入口 --}}
<div
id=
"placeholder-feedback-store"
></div>
...
...
@@ -139,4 +142,17 @@
{{>
common
/
suspend-home
}}
</div>
{{#if
vip_return_coin_info
}}
<div
class=
"coin-intro-box hide"
>
<div
class=
"coin-intro"
>
<ul
class=
"coin-ul"
>
{{#
vip_return_coin_info
}}
<li
class=
"coin-li"
><span
class=
"vip-img"
>
</span>
{{{
title
}}}
</li>
{{/
vip_return_coin_info
}}
</ul>
<div
class=
"tip"
>
页面展示有货币为预计结果,因为页面缓存等原因可能有出入,最终返还结果以结算提示为准
</div>
</div>
</div>
{{/if}}
{{/
result
}}
...
...
config/common.js
View file @
4de0011
...
...
@@ -21,6 +21,7 @@ const domains = {
// gray
// api: 'http://apigray.yoho.cn/',
// service: 'http://apigray.yoho.cn/',
// platformApi: 'http://172.16.6.210:8088/',
...
...
docker.sh
View file @
4de0011
...
...
@@ -8,4 +8,4 @@ yarn build
else
npm i --production
fi
tar -cz
v
f yoho-yohobuy-wap.tar.gz
*
tar -czf yoho-yohobuy-wap.tar.gz
*
...
...
doraemon/middleware/rewrite.js
View file @
4de0011
...
...
@@ -122,6 +122,8 @@ const resolvePathParams = (req, res, next) => {
let
queryParams
=
req
.
query
;
let
pathParams
=
req
.
params
.
pathParams
;
pathParams
=
_
.
replace
(
pathParams
,
'.html'
,
''
);
// 1. 取 path 的参数
req
.
query
=
listParamsProcess
.
getParams
(
pathParams
);
...
...
@@ -149,6 +151,9 @@ const resolvePathParams = (req, res, next) => {
*/
const
resolvePathParamsAjax
=
(
req
,
res
,
next
)
=>
{
let
pathParams
=
_
.
last
(
_
.
split
(
req
.
query
.
currentUrl
,
'/'
));
pathParams
=
_
.
replace
(
pathParams
,
'.html'
,
''
);
let
currentUrlParams
=
listParamsProcess
.
getParams
(
pathParams
);
let
queryParams
=
{};
...
...
@@ -158,6 +163,10 @@ const resolvePathParamsAjax = (req, res, next) => {
req
.
query
.
order
=
currentUrlParams
.
order
;
}
if
(
currentUrlParams
.
brand
&&
req
.
query
.
brand
===
'0'
)
{
req
.
query
.
brand
=
currentUrlParams
.
brand
;
}
req
.
query
=
_
.
assign
(
queryParams
,
currentUrlParams
,
req
.
query
);
return
next
();
...
...
doraemon/middleware/seo/seoConfig.js
View file @
4de0011
const
seoMap
=
{
/* eslint-disable */
'/'
:
{
title
:
'Yoho!Buy有货|年轻人潮流购物中心,中国潮流购物风向标'
,
keywords
:
'Yoho!Buy有货 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款'
,
description
:
'Yoho!Buy有货,年轻人潮流购物中心,中国大型潮流商品购物网站。全场品牌正品保证,支持货到付款。'
title
:
'YOHO!BUY 有货-年轻人潮流购物中心,时尚潮流购物网站'
,
keywords
:
'潮流,时尚潮流,潮流服饰,潮流购物网,潮流网站'
,
description
:
'【YOHO!BUY有货】,年轻人潮流购物中心,中国潮流商品购物网站。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和国内流行商品,★全场品牌正品保证,支持货到付款★'
},
'/boys'
:
{
title
:
'男式服饰|男装,休闲男装,时尚男装品牌|Yoho!Buy有货'
,
keywords
:
'男装,休闲男装,时尚男装品牌,男式服饰,Yoho!Buy有货'
,
description
:
'Yoho!Buy有货男装汇集国内国际各大男装品牌,提供品牌男装、休闲男装、商务男装、外套,全场正品保证!'
title
:
'【潮流男装】_品牌,价格,图片,新款-YOHO!BUY 有货'
,
keywords
:
'潮流男装'
,
description
:
'潮流网购就上YOHO!BUY有货,有货网潮流男装提供潮流男装品牌、潮流男装图片等信息。销售正品新款潮流男装,全场低至4折,★全场品牌正品保证,支持货到付款!★'
},
'/girls'
:
{
title
:
'潮流女装|时尚女装,日韩女装,潮牌女装全球购|Yoho!BUY有货'
,
keywords
:
'潮流女装,女生服饰,时尚潮流女装,日韩女装,女装正品购物网站,女装全球购'
,
description
:
'Yoho!BUY有货官网女生频道汇集了全球女装潮流时尚,提供时尚潮流女装,日版女装,韩版女装,潮牌女装正品全球购,全场正品保证!'
title
:
'【潮流女装】_品牌,价格,图片,新款-YOHO!BUY 有货'
,
keywords
:
'潮流女装'
,
description
:
'潮流网购就上YOHO!BUY有货,有货网潮流女装提供潮流女装品牌、潮流女装图片等信息。销售正品新款潮流女装,全场低至4折,★全场品牌正品保证,支持货到付款!★'
},
'/kids'
:
{
title
:
'潮童|男童装,女童装,韩版儿童服装服饰|Yoho!BUY有货'
,
keywords
:
'潮童,男童装,女童装,韩版童装,儿童服装服饰'
,
description
:
'Yoho!BUY有货官网潮童频道汇集了全球潮童潮流时尚,提供新款男童装,女童装,韩版童装,儿童服装服饰正品全球购。'
title
:
'【潮流童装】_品牌,价格,图片,新款-YOHO!BUY 有货'
,
keywords
:
'潮流童装'
,
description
:
'潮流网购就上YOHO!BUY有货,有货网潮流童装提供潮流童装品牌、潮流童装图片等信息。销售正品新款潮流童装,全场低至4折,★全场品牌正品保证,支持货到付款!★'
},
'/lifestyle'
:
{
title
:
'创意生活|创意生活馆,潮流创意家居,家居生活用品|Yoho!BUY有货'
,
keywords
:
'创意生活,创意生活馆,潮流家居,潮流创意家居,家居生活用品,Yoho!Buy有货'
,
description
:
'Yoho!BUY有货官网创意生活频道提供了潮流创意家居,家居生活用品等正品网购,给您的生活带来更多创意。'
title
:
'【潮流生活商品】_品牌,价格,图片,新款-YOHO!BUY 有货'
,
keywords
:
'潮流创意生活商品'
,
description
:
'潮流网购就上YOHO!BUY有货,有货网潮流生活商品专卖店提供商品品牌、图片等信息。销售正品新款潮流生活商品,全场低至4折,★全场品牌正品保证,支持货到付款!★'
},
'/product/boys-sale/'
:
{
title
:
'折扣男装专区|男装SALE折扣,男款鞋包配饰特卖|Yoho!Buy有货 全场正品保证'
,
...
...
doraemon/models/footer_tab.js
View file @
4de0011
...
...
@@ -8,11 +8,11 @@
const
helpers
=
global
.
yoho
.
helpers
;
exports
.
getUrlData
=
function
(
type
,
gender
)
{
exports
.
getUrlData
=
function
(
type
)
{
const
urlData
=
{
indexUrl
:
helpers
.
urlFormat
(
'/?go=1'
),
// 首页
categoryUrl
:
helpers
.
urlFormat
(
'/cate'
),
// 分类
guangUrl
:
helpers
.
urlFormat
(
'/guang'
,
gender
?
{
gender
:
gender
}
:
null
),
// 逛首页
guangUrl
:
helpers
.
urlFormat
(
'/guang'
),
// 逛首页
shoppingCartUrl
:
helpers
.
urlFormat
(
'/cart/index/index'
),
// 购物车
mineUrl
:
helpers
.
urlFormat
(
'/home'
)
// 个人中心
};
...
...
doraemon/views/layout.hbs
View file @
4de0011
...
...
@@ -125,95 +125,27 @@
<input
type=
"hidden"
id=
"no-download"
value=
"no-download"
>
{{/if}}
{{#
wechatShare
}}
<script
type=
"text/javascript"
src=
"//res.wx.qq.com/open/js/jweixin-1.3.2.js"
></script>
<script
type=
"text/javascript"
src=
"//res.wx.qq.com/open/js/jweixin-1.3.2.js"
crossorigin=
"anonymous"
></script>
{{/
wechatShare
}}
{{#
loadJsBefore
}}
<script
src=
"
{{
src
}}
"
crossorigin=
"anonymous"
></script>
{{/
loadJsBefore
}}
{{#if
devEnv
}}
<script>
<script>
var STATIC_RESOURCE_HASH = '
{{
startTime
}}
';
var STATIC_RESOURCE_PATH = '//
{{
devHost
}}
:
{{
port
}}
'
;
window.jsFiles = [
{{#
loadJsBefore
}}
'
{{
src
}}
',
{{/
loadJsBefore
}}
'//
{{
devHost
}}
:
{{
port
}}
/libs.js?t=
{{
startTime
}}
',
'//
{{
devHost
}}
:
{{
port
}}
/
{{
module
}}
.
{{
page
}}
.js?t=
{{
startTime
}}
'
{{#
loadJs
}}
,'
{{
src
}}
'
{{/
loadJs
}}
];
</script>
<script
src=
"//
{{
devHost
}}
:
{{
port
}}
/libs.js?t=
{{
startTime
}}
"
crossorigin=
"anonymous"
></script>
<script
src=
"//
{{
devHost
}}
:
{{
port
}}
/
{{
module
}}
.
{{
page
}}
.js?t=
{{
startTime
}}
"
crossorigin=
"anonymous"
></script>
{{^}}
<script>
var STATIC_RESOURCE_HASH = '
{{
startTime
}}
';
var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/
{{
version
}}
'
;
window.jsFiles = [
{{#
loadJsBefore
}}
'
{{
src
}}
',
{{/
loadJsBefore
}}
'//cdn.yoho.cn/yohobuywap-node/
{{
version
}}
/libs.js?t=
{{
startTime
}}
',
'//cdn.yoho.cn/yohobuywap-node/
{{
version
}}
/
{{
module
}}
.
{{
page
}}
.js?t=
{{
startTime
}}
'
{{#
loadJs
}}
,'
{{
src
}}
'
{{/
loadJs
}}
];
</script>
<script
src=
"//cdn.yoho.cn/yohobuywap-node/
{{
version
}}
/libs.js?t=
{{
startTime
}}
"
crossorigin=
"anonymous"
></script>
<script
src=
"//cdn.yoho.cn/yohobuywap-node/
{{
version
}}
/
{{
module
}}
.
{{
page
}}
.js?t=
{{
startTime
}}
"
crossorigin=
"anonymous"
></script>
{{/if}}
<script>
(
function
()
{
function
addOnload
(
node
,
callback
)
{
var
supportOnload
=
'onload'
in
node
;
if
(
supportOnload
)
{
node
.
onload
=
callback
;
}
else
{
node
.
onreadystatechange
=
function
()
{
if
(
/loaded|complete/
.
test
(
node
.
readyState
))
{
return
callback
();
}
};
}
}
function
loadJS
(
src
,
retryMode
)
{
var
ref
=
document
.
getElementsByTagName
(
'script'
)[
0
];
var
script
=
document
.
createElement
(
'script'
);
var
scriptSrc
;
if
(
retryMode
)
{
scriptSrc
=
src
;
}
else
{
scriptSrc
=
window
.
jsFiles
.
shift
();
}
if
(
!
scriptSrc
)
{
return
;
}
script
.
src
=
scriptSrc
;
script
.
crossorigin
=
'anonymous'
;
if
(
!
retryMode
)
{
script
.
onerror
=
function
()
{
if
(
script
.
parentNode
)
{
script
.
parentNode
.
removeChild
(
script
);
}
script
.
onerror
=
script
.
onreadystatechange
=
null
;
loadJS
(
script
.
src
,
true
);
};
}
addOnload
(
script
,
function
()
{
script
.
onload
=
script
.
onreadystatechange
=
null
;
loadJS
();
});
ref
.
parentNode
.
insertBefore
(
script
,
ref
);
return
script
;
}
loadJS
();
}());
</script>
{{#
unless
devEnv
}}
{{>
analysis
}}
{{/
unless
}}
...
...
doraemon/views/partial/footer-tab.hbs
View file @
4de0011
...
...
@@ -12,11 +12,11 @@
<p
class=
"iconfont tab-icon"
>

</p>
<p
class=
"tab-name"
>
逛
</p>
</a>
<a
class=
"tab-item
{{#if
shoppingCartPage
}}
current
{{/if}}
"
href=
"
{{
shoppingCartUrl
}}
"
>
<a
class=
"tab-item
{{#if
shoppingCartPage
}}
current
{{/if}}
"
href=
"
{{
shoppingCartUrl
}}
"
rel=
"nofollow"
>
<p
class=
"iconfont tab-icon"
>

</p>
<p
class=
"tab-name"
>
购物车
</p>
</a>
<a
class=
"tab-item
{{#if
minePage
}}
current
{{/if}}
"
href=
"
{{
mineUrl
}}
"
>
<a
class=
"tab-item
{{#if
minePage
}}
current
{{/if}}
"
href=
"
{{
mineUrl
}}
"
rel=
"nofollow"
>
<p
class=
"iconfont tab-icon"
>

</p>
<p
class=
"tab-name"
>
我的
</p>
</a>
...
...
doraemon/views/partial/resources/banner-top.hbs
View file @
4de0011
...
...
@@ -4,14 +4,14 @@
{{#
each
data
}}
{{#if
@first
}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
url
}}
"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
240
q
=
60
}}
"
>
<a
href=
"
{{
url
}}
"
rel=
"nofollow"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
240
q
=
60
}}
"
alt=
"banner轮播图"
>
</a>
</li>
{{^}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
url
}}
"
>
<img
class=
"swiper-lazy"
data-src=
"
{{
image2
src
w
=
640
h
=
240
q
=
60
}}
"
>
<a
href=
"
{{
url
}}
"
rel=
"nofollow"
>
<img
class=
"swiper-lazy"
data-src=
"
{{
image2
src
w
=
640
h
=
240
q
=
60
}}
"
alt=
"banner轮播图"
>
</a>
</li>
{{/if}}
...
...
doraemon/views/partial/resources/banner.hbs
View file @
4de0011
{{#if
singleOne
}}
{{#
data
}}
<div
class=
"banner-list"
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
""
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
rel=
"nofollow"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
"活动图片"
>
</a>
</div>
{{/
data
}}
...
...
@@ -11,8 +11,8 @@
<ul
class=
"banner-list swiper-wrapper clearfix"
>
{{#
data
}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
""
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
rel=
"nofollow"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
"活动图片"
>
</a>
</li>
{{/
data
}}
...
...
doraemon/views/partial/resources/goods-category.hbs
View file @
4de0011
...
...
@@ -33,9 +33,9 @@
<a
href=
"
{{
url
}}
"
>
<div
class=
"img-box"
>
{{#if
@first
}}
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
258
h
=
383
q
=
60
}}
"
alt=
""
>
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
258
h
=
383
q
=
60
}}
"
alt=
"
{{
title
}}
"
>
{{^}}
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
191
h
=
191
q
=
60
}}
"
alt=
""
>
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
191
h
=
191
q
=
60
}}
"
alt=
"
{{
title
}}
"
>
{{/if}}
</div>
<p
class=
"category-name"
>
{{
title
}}
</p>
...
...
doraemon/views/partial/resources/hot-brands-list.hbs
View file @
4de0011
...
...
@@ -6,7 +6,7 @@
<a
href=
"
{{
url
}}
"
>
<div
class=
"brand-logo"
>
{{!--此处不使用 Lazyload 是由于安卓 UC 10 版本加载不出来--}}
<img
src=
"
{{
image2
src
w
=
158
h
=
174
q
=
60
}}
"
>
<img
src=
"
{{
image2
src
w
=
158
h
=
174
q
=
60
}}
"
alt=
"
{{
title
}}
"
>
</div>
{{!--<p class="brand-name">{{name}}</p>--}}
</a>
...
...
doraemon/views/partial/resources/hot-category.hbs
View file @
4de0011
...
...
@@ -12,7 +12,7 @@
<li>
<a
href=
"
{{
url
}}
"
>
<div
class=
"img-box"
>
<img
src=
"
{{
image2
src
w
=
140
h
=
140
q
=
60
}}
"
alt=
""
>
<img
src=
"
{{
image2
src
w
=
140
h
=
140
q
=
60
}}
"
alt=
"
{{
title
}}
"
>
</div>
</a>
</li>
...
...
doraemon/views/partial/resources/hot-single.hbs
View file @
4de0011
{{#
data
}}
<div
class=
"hot-single"
>
{{>
common
/
floor-header-more
}}
{{#
title
}}
<div
class=
"floor-header-more"
>
<h2>
{{#if
title
}}{{
title
}}{{else}}{{
name
}}{{/if}}
</h2>
{{#if
more_url
}}
<a
class=
"more-btn iconfont"
href=
"
{{
more_url
}}
"
rel=
"nofollow"
>

</a>
{{/if}}
</div>
{{/
title
}}
{{>
resources
/
new-floor-banner
}}
<div
class=
"hot-single-goods-list"
{{#
background
}}
style=
"background-image: url(
{{
image2
src
w
=
640
h
=
330
q
=
60
}}
)"
{{/
background
}}
>
<ul>
...
...
package.json
View file @
4de0011
{
"name"
:
"yohobuywap-node"
,
"version"
:
"6.5.53"
,
"version"
:
"
9
6.5.53"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
@@ -57,18 +57,18 @@
"body-parser"
:
"^1.18.0"
,
"cheerio"
:
"^0.22.0"
,
"client-sessions"
:
"^0.8.0"
,
"compression"
:
"^1.7.
0
"
,
"compression"
:
"^1.7.
2
"
,
"connect-multiparty"
:
"^2.0.0"
,
"connect-redis"
:
"^3.3.3"
,
"cookie-parser"
:
"^1.4.3"
,
"cssnano"
:
"^3.10.0"
,
"express"
:
"^4.1
5.4
"
,
"express"
:
"^4.1
6.3
"
,
"feed"
:
"^1.1.0"
,
"geetest"
:
"^4.1.2"
,
"lodash"
:
"^4.17.4"
,
"handlebars"
:
"^4.0.11"
,
"lodash"
:
"^4.17.5"
,
"memory-cache"
:
"^0.2.0"
,
"moment"
:
"^2.20.1"
,
"oneapm"
:
"^1.2.20"
,
"moment"
:
"^2.22.1"
,
"passport"
:
"^0.4.0"
,
"passport-local"
:
"^1.0.0"
,
"passport-qq"
:
"^0.1.0"
,
...
...
@@ -77,12 +77,12 @@
"passport-weixin"
:
"^0.2.0"
,
"path-to-regexp"
:
"^2.1.0"
,
"redis"
:
"^2.8.0"
,
"request"
:
"^2.8
1
.0"
,
"request"
:
"^2.8
5
.0"
,
"request-promise"
:
"^4.2.1"
,
"semver"
:
"^5.
4.1
"
,
"semver"
:
"^5.
5.0
"
,
"sitemap"
:
"^1.13.0"
,
"urlencode"
:
"^1.1.0"
,
"uuid"
:
"^3.
1.0
"
,
"uuid"
:
"^3.
2.1
"
,
"xml2js"
:
"^0.4.19"
,
"yoho-express-session"
:
"^2.0.0"
,
"yoho-md5"
:
"^2.0.0"
,
...
...
@@ -91,60 +91,60 @@
},
"devDependencies"
:
{
"@mapbox/stylelint-processor-arbitrary-tags"
:
"^0.2.0"
,
"autoprefixer"
:
"^
7.2.4
"
,
"autoprefixer"
:
"^
8.3.0
"
,
"babel-core"
:
"^6.26.0"
,
"babel-eslint"
:
"^8.2.2"
,
"babel-loader"
:
"^7.1.2"
,
"babel-eslint"
:
"^8.2.3"
,
"babel-loader"
:
"^7.1.4"
,
"babel-plugin-transform-runtime"
:
"^6.23.0"
,
"babel-preset-env"
:
"^1.6.0"
,
"babel-runtime"
:
"^6.26.0"
,
"css-loader"
:
"^0.28.8"
,
"echarts"
:
"^3.7.1"
,
"eslint"
:
"^4.15.0"
,
"css-loader"
:
"^0.28.11"
,
"echarts"
:
"^4.0.4"
,
"eslint"
:
"^4.19.1"
,
"eslint-config-yoho"
:
"^1.0.9"
,
"eslint-plugin-html"
:
"^4.0.1"
,
"extract-text-webpack-plugin"
:
"^3.0.0"
,
"friendly-errors-webpack-plugin"
:
"^1.6.1"
,
"handlebars-loader"
:
"^1.6.0"
,
"happypack"
:
"^4.0.0"
,
"eslint-plugin-html"
:
"^4.0.3"
,
"extract-text-webpack-plugin"
:
"^4.0.0-beta.0"
,
"friendly-errors-webpack-plugin"
:
"^1.7.0"
,
"handlebars-loader"
:
"^1.7.0"
,
"husky"
:
"^0.14.3"
,
"intersection-observer"
:
"^0.5.0"
,
"jquery-lazyload"
:
"^1.9.7"
,
"lint-staged"
:
"^7.0.4"
,
"lozad"
:
"^1.0.9"
,
"nodemon"
:
"^1.14.10"
,
"postcss"
:
"^6.0.16"
,
"lozad"
:
"^1.4.0"
,
"nodemon"
:
"^1.17.3"
,
"postcss"
:
"^6.0.21"
,
"postcss-assets"
:
"^5.0.0"
,
"postcss-calc"
:
"^6.0.0"
,
"postcss-center"
:
"^1.0.0"
,
"postcss-clearfix"
:
"^2.0.1"
,
"postcss-crip"
:
"^2.0.1"
,
"postcss-import"
:
"^11.0.0"
,
"postcss-loader"
:
"^2.0.10"
,
"postcss-import"
:
"^11.1.0"
,
"postcss-loader"
:
"^2.1.4"
,
"postcss-position"
:
"^1.0.0"
,
"postcss-pxtorem"
:
"^4.0.1"
,
"postcss-scss"
:
"^1.0.
3
"
,
"postcss-scss"
:
"^1.0.
5
"
,
"postcss-short"
:
"^4.1.0"
,
"postcss-sprites"
:
"^4.2.1"
,
"postcss-use"
:
"^
2.3
.0"
,
"postcss-use"
:
"^
3.0
.0"
,
"precss"
:
"^2.0.0"
,
"shelljs"
:
"^0.
7.8
"
,
"shelljs"
:
"^0.
8.1
"
,
"store"
:
"^2.0.12"
,
"style-loader"
:
"^0.19.1"
,
"stylelint"
:
"^8.1.1"
,
"stylelint-config-yoho"
:
"^1.2.12"
,
"style-loader"
:
"^0.21.0"
,
"stylelint"
:
"^9.2.0"
,
"stylelint-config-yoho"
:
"^1.3.0"
,
"stylelint-formatter-table"
:
"^1.0.2"
,
"vue"
:
"^2.5.1
3
"
,
"vue"
:
"^2.5.1
6
"
,
"vue-infinite-scroll"
:
"^2.0.1"
,
"vue-lazyload"
:
"^1.1.3"
,
"vue-loader"
:
"^13.7.0"
,
"vue-template-compiler"
:
"^2.5.13"
,
"webpack"
:
"^3.5.6"
,
"webpack-dev-middleware"
:
"^2.0.4"
,
"webpack-dev-server"
:
"^2.10.1"
,
"webpack-hot-middleware"
:
"^2.19.1"
,
"webpack-merge"
:
"^4.1.0"
,
"whatwg-fetch"
:
"^2.0.3"
,
"vue-lazyload"
:
"^1.2.3"
,
"vue-loader"
:
"^14.2.2"
,
"vue-template-compiler"
:
"^2.5.16"
,
"webpack"
:
"^4.6.0"
,
"webpack-cli"
:
"^2.0.15"
,
"webpack-dev-middleware"
:
"^3.1.2"
,
"webpack-dev-server"
:
"^3.1.3"
,
"webpack-hot-middleware"
:
"^2.22.1"
,
"webpack-merge"
:
"^4.1.2"
,
"whatwg-fetch"
:
"^2.0.4"
,
"workbox-sw"
:
"^2.1.2"
,
"yoho-cookie"
:
"^1.2.0"
,
"yoho-fastclick"
:
"^1.0.6"
,
...
...
public/build/webpack.base.config.js
View file @
4de0011
...
...
@@ -6,23 +6,16 @@
'use strict'
;
const
os
=
require
(
'os'
);
const
path
=
require
(
'path'
);
const
shelljs
=
require
(
'shelljs'
);
const
_
=
require
(
'lodash'
);
const
webpack
=
require
(
'webpack'
);
const
HappyPack
=
require
(
'happypack'
);
const
{
cssLoader
,
hbsLoader
}
=
require
(
'./utils.js'
);
const
postcssConfig
=
require
(
'./postcss.config.js'
);
const
happyThreadPool
=
HappyPack
.
ThreadPool
({
// eslint-disable-line
size
:
os
.
cpus
().
length
});
const
getEntries
=
()
=>
{
const
entries
=
{
libs
:
[
'yoho-jquery'
,
path
.
join
(
__dirname
,
'../js/global.js'
)],
common
:
path
.
join
(
__dirname
,
'../scss/common.css'
),
feature
:
path
.
join
(
__dirname
,
'../scss/feature.css'
)
};
...
...
@@ -34,7 +27,10 @@ const getEntries = () => {
// Important
// 生成规则:module.page: './js/module/page/index.js'
entries
[
`
$
{
dir
[
0
]}.
$
{
dir
[
1
]}
`
]
=
path
.
join
(
__dirname
,
`
..
/
js
/
$
{
dir
.
join
(
'/'
)}
`
);
entries
[
`
$
{
dir
[
0
]}.
$
{
dir
[
1
]}
`
]
=
[
path
.
join
(
__dirname
,
'../js/global.js'
),
path
.
join
(
__dirname
,
`
..
/
js
/
$
{
dir
.
join
(
'/'
)}
`
)
];
});
// 老的生成规则module.page.js
...
...
@@ -43,7 +39,10 @@ const getEntries = () => {
// Important
// 生成规则:module.page: './js/module/xx.page.js'
entries
[
`
$
{
dir
[
0
]}.
$
{
dir
[
1
].
match
(
/
(
.*
)
.page.js/
)[
1
]}
`
]
=
path
.
join
(
__dirname
,
`
..
/
js
/
$
{
dir
.
join
(
'/'
)}
`
);
entries
[
`
$
{
dir
[
0
]}.
$
{
dir
[
1
].
match
(
/
(
.*
)
.page.js/
)[
1
]}
`
]
=
[
path
.
join
(
__dirname
,
'../js/global.js'
),
path
.
join
(
__dirname
,
`
..
/
js
/
$
{
dir
.
join
(
'/'
)}
`
)
];
});
return
entries
;
...
...
@@ -78,16 +77,14 @@ module.exports = (env) => {
test
:
/
\.
js$/
,
exclude
:
[
/node_modules/
],
use
:
[{
loader
:
'
happypack/loader?id=js
'
loader
:
'
babel-loader
'
}]
},
{
test
:
/
\.
css$/
,
use
:
cssLoader
(
env
,
'css'
)
},
{
test
:
/
\.
hbs$/
,
use
:
[{
loader
:
'happypack/loader?id=hbs'
}]
use
:
[
hbsLoader
]
}]
},
resolve
:
{
...
...
@@ -105,21 +102,34 @@ module.exports = (env) => {
stats
:
{
children
:
false
},
optimization
:
{
splitChunks
:
{
cacheGroups
:
{
default
:
false
,
libs
:
{
test
:
(
file
)
=>
{
if
(
file
.
rawRequest
===
'yoho-jquery'
)
{
return
true
;
}
if
(
file
.
rawRequest
===
path
.
join
(
__dirname
,
'../js/global.js'
))
{
return
true
;
}
return
false
;
},
name
:
'libs'
,
chunks
:
'initial'
,
enforce
:
true
}
}
}
},
performance
:
{
maxEntrypointSize
:
512000
,
maxAssetSize
:
512000
},
plugins
:
[
new
HappyPack
({
id
:
'js'
,
threadPool
:
happyThreadPool
,
loaders
:
[
'babel-loader'
],
}),
new
HappyPack
({
id
:
'hbs'
,
threadPool
:
happyThreadPool
,
loaders
:
[
hbsLoader
]
}),
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'libs'
,
filename
:
'libs.js'
}),
new
webpack
.
ProvidePlugin
({
$
:
'yoho-jquery'
,
jQuery
:
'yoho-jquery'
,
...
...
public/build/webpack.dev.config.js
View file @
4de0011
...
...
@@ -17,10 +17,15 @@ if (devInfo.publicPath.indexOf('https')) {
}
module
.
exports
=
merge
(
baseConfig
,
{
mode
:
'development'
,
output
:
{
publicPath
:
devInfo
.
publicPath
},
devtool
:
'source-map'
,
devtool
:
'eval'
,
performance
:
{
maxEntrypointSize
:
2048000
,
maxAssetSize
:
2048000
},
plugins
:
[
new
ExtractTextPlugin
(
'[name].css'
),
new
webpack
.
HotModuleReplacementPlugin
(),
...
...
public/build/webpack.dll.indexcss.config.js
View file @
4de0011
const
webpack
=
require
(
'webpack'
);
const
path
=
require
(
'path'
);
const
shelljs
=
require
(
'shelljs'
);
const
{
cssLoader
}
=
require
(
'./utils.js'
);
...
...
@@ -12,6 +11,7 @@ shelljs.cp('-R', path.join(__dirname, '../img/'), distDir);
shelljs
.
cp
(
'-R'
,
path
.
join
(
__dirname
,
'../font/'
),
distDir
);
let
webpackConfig
=
{
mode
:
'production'
,
entry
:
{
index
:
[
path
.
join
(
__dirname
,
'../scss/index.css'
)]
},
...
...
@@ -25,13 +25,15 @@ let webpackConfig = {
use
:
cssLoader
(
'pro'
,
'css'
)
}]
},
stats
:
{
children
:
false
},
performance
:
{
maxEntrypointSize
:
5120000
,
maxAssetSize
:
5120000
},
plugins
:
[
new
ExtractTextPlugin
(
'[name].css'
),
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
'"production"'
}
})
new
ExtractTextPlugin
(
'[name].css'
)
]
};
...
...
public/build/webpack.prod.config.js
View file @
4de0011
...
...
@@ -2,7 +2,6 @@
const
path
=
require
(
'path'
);
const
shelljs
=
require
(
'shelljs'
);
const
webpack
=
require
(
'webpack'
);
const
merge
=
require
(
'webpack-merge'
);
const
ExtractTextPlugin
=
require
(
'extract-text-webpack-plugin'
);
const
config
=
require
(
'../../package.json'
);
...
...
@@ -18,25 +17,11 @@ shelljs.cp('-R', path.join(__dirname, './dll/*'), distDir);
baseConfig
=
baseConfig
(
'pro'
);
module
.
exports
=
merge
(
baseConfig
,
{
mode
:
'production'
,
output
:
{
path
:
distDir
},
plugins
:
[
new
ExtractTextPlugin
(
'[name].css'
),
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
'"production"'
}
}),
new
webpack
.
optimize
.
UglifyJsPlugin
({
parallel
:
true
,
sourceMap
:
true
,
uglifyOptions
:
{
compress
:
{
warnings
:
false
},
comments
:
false
}
})
new
ExtractTextPlugin
(
'[name].css'
)
]
});
...
...
public/build/webpack.sw.config.js
View file @
4de0011
const
webpack
=
require
(
'webpack'
);
const
path
=
require
(
'path'
);
module
.
exports
=
{
mode
:
'production'
,
entry
:
{
sw
:
path
.
join
(
__dirname
,
'../js/pwa/sw.js'
)
},
...
...
@@ -16,13 +17,5 @@ module.exports = {
include
:
[
path
.
join
(
__dirname
,
'../../node_modules/workbox-sw'
),
path
.
join
(
__dirname
,
'../js'
)],
use
:
'babel-loader'
}]
},
plugins
:
[
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
'"production"'
}
}),
new
webpack
.
optimize
.
UglifyJsPlugin
()
]
}
};
...
...
public/hbs/product/detail/promotion-yoho-coin.hbs
0 → 100644
View file @
4de0011
{{#if
promYohoCoinText
}}
<div
class=
"goods-discount"
id=
"goodsDiscountYohoCoin"
>
<h2
class=
"coin-item short-text tap-hightlight"
>
<span
class=
"promotion-icon"
>
返
</span>
{{
promYohoCoinText
}}
<span
class=
"icon-down iconfont"
>

</span>
</h2>
</div>
{{/if}}
...
...
public/hbs/product/detail/promotion.hbs
View file @
4de0011
...
...
@@ -11,4 +11,4 @@
{{/if}}
{{/
each
}}
</div>
{{/if}}
\ No newline at end of file
{{/if}}
...
...
public/js/cart/index/good.js
View file @
4de0011
...
...
@@ -20,11 +20,15 @@ let goodObj = {
$
(
'.good-item'
).
on
(
'click'
,
'.num-opt .btn'
,
function
(
e
)
{
self
.
modifyNumClick
(
e
);
});
$
(
'.good-item'
).
on
(
'
click
'
,
'.chk.select'
,
function
(
e
)
{
$
(
'.good-item'
).
on
(
'
touchend
'
,
'.chk.select'
,
function
(
e
)
{
self
.
checkSelectClick
(
e
);
e
.
stopPropagation
();
e
.
preventDefault
();
});
$
(
'.good-item'
).
on
(
'
click
'
,
'.chk.edit'
,
function
(
e
)
{
$
(
'.good-item'
).
on
(
'
touchend
'
,
'.chk.edit'
,
function
(
e
)
{
self
.
checkClick
(
e
);
e
.
stopPropagation
();
e
.
preventDefault
();
});
$
(
'.btn-fav'
).
on
(
'click'
,
function
()
{
self
.
favClick
();
...
...
@@ -32,7 +36,7 @@ let goodObj = {
$
(
'.good-item'
).
on
(
'click'
,
'.edit-size-info'
,
function
(
e
)
{
self
.
sizeInfoClick
(
e
);
});
$
(
'.good-item'
).
on
(
'
touchend
'
,
'.name,.color-size-row,.img'
,
function
(
e
)
{
$
(
'.good-item'
).
on
(
'
click
'
,
'.name,.color-size-row,.img'
,
function
(
e
)
{
self
.
goodClick
(
e
);
});
$
(
'.good-item'
).
on
(
'click'
,
'.bottom .re-add'
,
function
(
e
)
{
...
...
public/js/cart/order-ensure.js
View file @
4de0011
...
...
@@ -207,7 +207,7 @@ function submitOrder(verifyCode) {
isSubmiting
=
true
;
let
postData
=
{
addressId
:
orderInfo
(
'address
I
d'
),
addressId
:
orderInfo
(
'address
_i
d'
),
cartType
:
orderInfo
(
'cartType'
)
||
'ordinary'
,
deliveryId
:
orderInfo
(
'deliveryId'
),
deliveryTimeId
:
orderInfo
(
'deliveryTimeId'
),
...
...
@@ -309,8 +309,8 @@ function submitOrder(verifyCode) {
}
// 界面点击,状态存 cookie
if
(
!
orderInfo
(
'addressId'
))
{
orderInfo
(
'addressId'
,
$addressWrap
.
data
(
'id'
));
if
(
!
orderInfo
(
'address_id'
))
{
orderInfo
(
'address_id'
,
$addressWrap
.
data
(
'id'
));
}
$
(
'.delivery-id'
).
on
(
'touchend'
,
'li'
,
function
(
event
)
{
...
...
public/js/cart/order-info.js
View file @
4de0011
...
...
@@ -17,7 +17,7 @@ function init() {
deliveryTimeId
:
1
,
paymentTypeId
:
1
,
yohoCoin
:
0
,
address
I
d
:
null
,
address
_i
d
:
null
,
coupon_code
:
null
,
invoice
:
null
,
invoices_title
:
null
,
...
...
public/js/cart/seckill/order-ensure.js
View file @
4de0011
...
...
@@ -228,7 +228,7 @@ function submitOrder(verifyCode) {
let
postData
=
{
activityId
:
activityId
,
sku
:
productSku
,
addressId
:
orderInfo
(
'address
I
d'
),
addressId
:
orderInfo
(
'address
_i
d'
),
cartType
:
orderInfo
(
'cartType'
)
||
'ordinary'
,
deliveryWay
:
orderInfo
(
'deliveryId'
),
deliveryTime
:
orderInfo
(
'deliveryTimeId'
),
...
...
@@ -302,8 +302,8 @@ function submitOrder(verifyCode) {
}
// 界面点击,状态存 cookie
if
(
!
orderInfo
(
'addressId'
))
{
orderInfo
(
'addressId'
,
$addressWrap
.
data
(
'id'
));
if
(
!
orderInfo
(
'address_id'
))
{
orderInfo
(
'address_id'
,
$addressWrap
.
data
(
'id'
));
}
// 配送方式 发生改变
...
...
public/js/cart/select-address.page.js
View file @
4de0011
...
...
@@ -24,7 +24,7 @@ $('.address-item').on('click', function() {
is_support
:
$this
.
data
(
'is-support'
)
};
orderInfo
(
'address
I
d'
,
addressId
);
orderInfo
(
'address
_i
d'
,
addressId
);
orderInfo
(
'address'
,
address
);
window
.
location
.
href
=
$this
.
data
(
'href'
)
+
(
orderInfo
(
'limitUrlSufix'
)
||
''
);
...
...
@@ -36,8 +36,8 @@ $('.address-item').on('click', function() {
});
$confim
.
on
(
'click'
,
'.confim'
,
function
()
{
if
(
orderInfo
(
'addressId'
)
===
deleteId
)
{
orderInfo
(
'addressId'
,
null
);
if
(
orderInfo
(
'address_id'
)
===
deleteId
)
{
orderInfo
(
'address_id'
,
null
);
orderInfo
(
'address'
,
null
);
}
});
...
...
public/js/home/address-act.page.js
View file @
4de0011
...
...
@@ -8,6 +8,16 @@ const $ = require('yoho-jquery'),
security
=
require
(
'plugin/security'
),
loading
=
require
(
'plugin/loading'
);
let
orderInfo
;
if
(
window
.
queryString
.
refer
===
'shopping'
)
{
orderInfo
=
require
(
'../cart/order-info'
).
orderInfo
;
}
if
(
window
.
queryString
.
refer
===
'buynow'
)
{
orderInfo
=
require
(
'../cart/buynow/order-info'
).
orderInfo
;
}
const
stringHandle
=
require
(
'common/helpers/stringHandle'
);
let
$addressForm
=
$
(
'.edit-address'
),
...
...
@@ -25,7 +35,7 @@ let $addressForm = $('.edit-address'),
let
$usernameInput
=
$addressForm
.
find
(
'[name="consignee"]'
);
let
Vue
=
require
(
'vue'
);
let
vueAddressAct
=
require
(
'home/address/address-act.vue'
);
let
vueAddressAct
=
require
(
'home/address/address-act.vue'
)
.
default
;
let
addressVact
=
new
Vue
({
el
:
'#vAddressAct'
,
...
...
@@ -68,10 +78,25 @@ $usernameInput.bind('input propertychange', function() {
}
});
/**
* 添加/编辑保存并设为默认地址
*/
const
setDefault
=
(
addressData
)
=>
{
let
address
=
{
address_id
:
addressData
.
address_id
,
consignee
:
addressData
.
consignee
,
mobile
:
addressData
.
mobile
,
address_info
:
`
$
{
addressData
.
area
}
$
{
addressData
.
address
}
`
,
is_support
:
addressData
.
is_support
};
orderInfo
(
'address_id'
,
addressData
.
address_id
);
orderInfo
(
'address'
,
address
);
};
// 提交表单请求
$addressForm
.
on
(
'submit'
,
function
()
{
let
username
=
$usernameInput
.
val
().
replace
(
/
(
^
\s
+
)
|
(\s
+$
)
/g
,
''
);
let
phone
=
$
(
this
).
find
(
'[name="mobile"]'
).
val
();
if
(
isSubmiting
)
{
return
false
;
...
...
@@ -97,11 +122,6 @@ $addressForm.on('submit', function() {
return
false
;
}
if
(
!
(
/^
[
0-9
]{11}
$/
.
test
(
phone
)))
{
tip
.
show
(
'请填写正确的手机号'
);
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="area_code"]'
).
val
()
||
!
$
(
this
).
find
(
'[name="area"]'
).
val
()
||
$
(
this
).
find
(
'[name="area_code"]'
).
val
().
length
<
6
)
{
tip
.
show
(
'省市区不能为空'
);
...
...
@@ -130,11 +150,15 @@ $addressForm.on('submit', function() {
loading
.
hideLoadingMask
();
}
else
if
(
window
.
queryString
)
{
if
(
window
.
queryString
.
refer
===
'buynow'
)
{
window
.
location
.
href
=
'/cart/index/buynow/selectAddress?product_sku='
+
setDefault
(
res
.
data
);
window
.
location
.
href
=
'/cart/index/buynow/orderensure?product_sku='
+
window
.
queryString
.
product_sku
+
'&buy_number='
+
window
.
queryString
.
buy_number
;
}
else
if
(
window
.
queryString
.
refer
===
'shopping'
)
{
window
.
location
.
href
=
'/cart/index/new/selectAddress'
;
setDefault
(
res
.
data
);
window
.
location
.
href
=
'/cart/index/new/orderEnsure?cartType=ordinary'
;
}
else
if
(
window
.
queryString
.
refer
===
'modify'
)
{
window
.
location
.
href
=
'/home/addressModify'
;
}
else
{
...
...
public/js/home/family.page.js
View file @
4de0011
...
...
@@ -160,9 +160,7 @@ class FamilyIndex extends Page {
radius
:
[
this
.
selector
.
chartWidth
*
3
/
10
,
this
.
selector
.
chartWidth
*
43
/
100
],
roseType
:
'radius'
,
center
:
[
'50%'
,
'50%'
],
label
:
{
normal
:
false
},
label
:
false
,
data
:
result
.
list
}
]
...
...
public/js/product/new-detail.js
View file @
4de0011
...
...
@@ -38,11 +38,21 @@ let shareData = {
imgUrl
:
productPic
};
if
(
yoho
.
isMarsApp
)
{
yoho
.
ready
(
function
()
{
let
nowShareData
=
{
title
:
`推荐这本城市指南给你:
$
{
productName
}
`
,
link
:
location
.
href
.
split
(
'?'
)[
0
],
desc
:
'最近很多 KOL 在推!据说是探索城市必备神器'
,
desCircle
:
`最近被刷屏的这本城市指南终于可以买到了!
$
{
productName
}
`
,
imgUrl
:
productPic
};
yoho
.
ready
(
function
()
{
if
(
yoho
.
isMarsApp
)
{
yoho
.
invokeMethod
(
'set.shareInfo'
,
shareData
);
});
}
}
else
if
(
yoho
.
isNowApp
)
{
yoho
.
invokeMethod
(
'set.shareInfo'
,
nowShareData
);
}
});
window
.
rePosFooter
&&
window
.
rePosFooter
();
...
...
public/js/yoho-app.js
View file @
4de0011
...
...
@@ -21,6 +21,7 @@ let emptyFn = function() {};
/* 提示信息 */
let
tipInfo
=
'暂不支持,请在YOHO!BUY应用中打开'
;
let
unknownInfo
=
'未知异常,请刷新页面后重试'
;
let
qs
=
window
.
queryString
;
...
...
@@ -54,7 +55,8 @@ yoho = {
data
:
window
.
yohoInterfaceData
,
ready
:
function
(
callback
)
{
if
(
this
.
isApp
)
{
// App 未注入 yohoInterface 的时候,延迟执行
if
(
this
.
isApp
&&
!
window
.
yohoInterface
)
{
document
.
addEventListener
(
'deviceready'
,
callback
);
}
else
{
return
callback
();
...
...
@@ -71,11 +73,15 @@ yoho = {
invokeMethod
:
function
(
method
,
args
,
success
,
fail
)
{
let
appInterface
=
window
.
yohoInterface
;
if
(
this
.
isApp
&&
appInterface
)
{
appInterface
.
triggerEvent
(
success
||
emptyFn
,
fail
||
emptyFn
,
{
method
:
method
,
arguments
:
args
});
if
(
this
.
isApp
)
{
if
(
appInterface
)
{
appInterface
.
triggerEvent
(
success
||
emptyFn
,
fail
||
emptyFn
,
{
method
:
method
,
arguments
:
args
});
}
else
{
tip
.
show
(
unknownInfo
);
}
}
else
{
tip
.
show
(
tipInfo
);
}
...
...
public/scss/cart/_pay-success.css
View file @
4de0011
...
...
@@ -59,6 +59,20 @@
text-align
:
right
;
}
}
.growth-tip
{
color
:
#b0b0b0
;
font-size
:
22px
;
line-height
:
48px
;
display
:
flex
;
align-items
:
center
;
font-weight
:
300
;
.icon-tan
{
font-size
:
48px
;
margin-right
:
5px
;
}
}
}
.btn-c
{
...
...
public/scss/layout/_common.css
View file @
4de0011
...
...
@@ -226,6 +226,10 @@ button {
content
:
"\e60c"
;
}
.icon-tan
:before
{
content
:
"\e73b"
;
}
.wx-footer-c
{
margin-top
:
30px
;
}
...
...
public/scss/product/detail/_coin-intro.css
0 → 100644
View file @
4de0011
.coin-intro-box
{
position
:
fixed
;
z-index
:
100
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
}
.coin-intro
{
position
:
absolute
;
height
:
600px
;
background-color
:
#fff
;
padding
:
30px
;
bottom
:
0
;
left
:
0
;
right
:
0
;
.coin-li
{
line-height
:
120px
;
border-bottom
:
1px
solid
#ccc
;
height
:
120px
;
.vip-img
{
width
:
53px
;
height
:
32px
;
margin-right
:
40px
;
display
:
inline-block
;
padding-left
:
8px
;
padding-top
:
5px
;
vertical-align
:
middle
;
line-height
:
88px
;
}
&
:nth-child
(
1
)
{
.vip-img
{
background
:
url("/product/silver.png")
no-repeat
;
}
}
&
:nth-child
(
2
)
{
.vip-img
{
background
:
url("/product/golden.png")
no-repeat
;
}
}
&
:nth-child
(
3
)
{
.vip-img
{
background
:
url("/product/platinum.png")
no-repeat
;
}
}
.return-coin-num
{
color
:
#d0021b
;
margin
:
auto
10px
;
}
}
.tip
{
position
:
absolute
;
bottom
:
30px
;
text-align
:
center
;
margin-right
:
30px
;
font-size
:
22px
;
color
:
#ccc
;
}
}
.hide
{
display
:
none
;
}
...
...
public/scss/product/detail/_detail.css
View file @
4de0011
...
...
@@ -715,7 +715,6 @@ $basicBtnC: #eb0313;
}
.goods-discount
{
margin-bottom
:
20px
;
padding-top
:
0
;
display
:
block
;
width
:
100%
;
...
...
@@ -731,6 +730,7 @@ $basicBtnC: #eb0313;
line-height
:
36px
;
}
.coin-item
>
.promotion-icon
,
.first-item
>
.promotion-icon
,
.folder-item
>
.promotion-icon
{
background-color
:
#d0021b
;
...
...
@@ -814,6 +814,7 @@ $basicBtnC: #eb0313;
}
.feedback-list
{
margin-top
:
20px
;
margin-bottom
:
20px
;
background-color
:
#f0f0f0
;
...
...
public/scss/product/detail/detail.page.css
View file @
4de0011
...
...
@@ -9,3 +9,4 @@
@import
"cart/chose-panel"
;
@import
"common/suspend-home"
;
@import
"bundle"
;
@import
"coin-intro"
;
...
...
utils/detail-process.js
View file @
4de0011
...
...
@@ -264,6 +264,18 @@ class DetailProcess {
finalResult
.
promotion
.
push
(
value
);
});
}
/**
* 处理有货币的促销数据
*/
static
processPromYohoCoin
(
promYohoCoinInfo
)
{
promYohoCoinInfo
=
_
.
map
(
promYohoCoinInfo
,
info
=>
{
info
.
title
=
_
.
replace
(
info
.
title
,
/
\d
+/
,
`
<
span
class
=
"return-coin-num"
>
$
{
info
.
return_coin_num
}
<
/span>`
)
;
return
info
;
});
return
promYohoCoinInfo
;
}
}
module
.
exports
=
DetailProcess
;
...
...
utils/product-process.js
View file @
4de0011
...
...
@@ -654,3 +654,19 @@ exports.processSizeInfo = (origin) => {
}
return
cartInfo
;
};
/**
* 处理有货币的促销信息
*/
exports
.
procPromYohoCoin
=
(
promotionYohoCoinData
,
vipLevel
)
=>
{
let
showText
=
''
;
_
.
forEach
(
promotionYohoCoinData
,
levelInfo
=>
{
if
(
_
.
get
(
levelInfo
,
'vip_level'
,
-
1
)
===
vipLevel
)
{
showText
=
levelInfo
.
title
;
return
;
}
});
return
showText
;
};
...
...
utils/search-process.js
View file @
4de0011
...
...
@@ -26,14 +26,16 @@ const getGenderByChannel = (channel) => {
* seo 获取性别
*/
const
_getGenderForSeo
=
(
gender
)
=>
{
let
seoGender
=
'
男生|女生
'
;
let
seoGender
=
''
;
switch
(
gender
)
{
case
'1'
:
case
'1,3'
:
seoGender
=
'男
生
'
;
seoGender
=
'男
士
'
;
break
;
case
'2'
:
case
'2,3'
:
seoGender
=
'女
生
'
;
seoGender
=
'女
士
'
;
break
;
default
:
break
;
...
...
@@ -164,7 +166,9 @@ const getFilterValueForSeo = (queryParams, apiData) => {
seniors
.
push
(
seoParams
.
style
);
}
seoParams
.
senior
=
_
.
join
(
seniors
,
','
);
if
(
seniors
.
length
)
{
seoParams
.
senior
=
_
.
join
(
seniors
,
','
);
}
return
seoParams
;
};
...
...
@@ -173,13 +177,11 @@ const getFilterValueForSeo = (queryParams, apiData) => {
* 品类列表页 SEO 数据
* @param {*} gender
* @param {*} sort_name
* @param isNewArrival 是否是新品到着
*/
const
getListSeoData
=
(
params
)
=>
{
let
seoData
=
{
title
:
'潮流服装配饰,创意生活用品_男生|女生|潮童服装,鞋履,配饰品牌正品-YOHO!BUY有货'
,
keywords
:
'潮流服装配饰,创意生活用品,男生服装配饰,女生服装配饰,潮童服装配饰'
,
description
:
'潮流服装配饰及创意生活正品网购!YOHO!BUY有货提供男生、女生、潮童服装配饰。全场品牌正品保证,支持货到付款。'
};
const
getListSeoData
=
(
params
,
isNewArrival
)
=>
{
let
genderName
=
_
.
get
(
params
,
'channel'
,
''
);
let
seoData
=
{};
let
seoParams
=
{
color
:
''
,
size
:
''
,
...
...
@@ -192,16 +194,34 @@ const getListSeoData = (params) => {
channel
:
''
};
if
(
params
)
{
_
.
assign
(
seoParams
,
params
);
let
baseInfo
=
`
$
{
seoParams
.
brand
}
$
{
seoParams
.
sort
}
`
;
if
(
_
.
get
(
params
,
'channel'
,
null
)
===
''
)
{
delete
params
.
channel
;
}
if
(
_
.
isEmpty
(
params
))
{
seoData
=
{
title
:
`
$
{
baseInfo
?
baseInfo
+
'|'
:
''
}
新款
$
{
seoParams
.
brand
}
$
{
seoParams
.
channel
}
$
{
seoParams
.
color
}
$
{
seoParams
.
size
}
$
{
seoParams
.
sort
}
$
{
seoParams
.
price
},
$
{
seoParams
.
brand
}
$
{
seoParams
.
senior
}
$
{
seoParams
.
sort
}
品牌正品
|
YOHO
!
BUY
有货`
,
// eslint-disable-line
keywords
:
`
$
{
baseInfo
?
baseInfo
+
','
:
''
}
新款
$
{
seoParams
.
brand
}
$
{
seoParams
.
channel
}
$
{
seoParams
.
color
}
$
{
seoParams
.
size
}
$
{
seoParams
.
sort
}
$
{
seoParams
.
price
},
$
{
seoParams
.
brand
}
$
{
seoParams
.
senior
}
$
{
seoParams
.
sort
}
品牌正品`
,
// eslint-disable-line
description
:
`
$
{
baseInfo
}
正品网购
!
YOHO
!
BUY
有货提供新款
$
{
seoParams
.
brand
}
$
{
seoParams
.
channel
}
$
{
seoParams
.
color
}
$
{
seoParams
.
size
}
$
{
seoParams
.
sort
}
$
{
seoParams
.
price
},
$
{
seoParams
.
brand
}
$
{
seoParams
.
senior
}
$
{
seoParams
.
sort
}
全场品牌正品保证
,
支持货到付款。`
// eslint-disable-line
title
:
'【潮流商品】_潮流男装_潮流女装_潮流童装-YOHO!BUY 有货'
,
keywords
:
'潮流服装配饰,创意生活用品,男生服装配饰,女生服装配饰,潮童服装配饰'
,
description
:
'潮流网购就上YOHO!BUY有货,有货网潮流商品专卖店提供潮流商品品牌、潮流商品价格、潮流商品图片等信息。销售正品新款潮流男装、潮流女装、潮流童装,全场低至4折,★全场品牌正品保证,支持货到付款!★'
// eslint-disable-line
};
}
else
{
_
.
assign
(
seoParams
,
params
);
delete
params
.
sort
;
if
(
_
.
isEmpty
(
params
))
{
seoData
=
{
title
:
`【
$
{
seoParams
.
sort
}
$
{
isNewArrival
?
'新品'
:
''
}
】
_$
{
seoParams
.
sort
}
价格
,
$
{
seoParams
.
sort
}
图片
,
$
{
seoParams
.
sort
}
款式
-
YOHO
!
BUY
有货`
,
// eslint-disable-line
keywords
:
`
$
{
seoParams
.
sort
},
$
{
seoParams
.
sort
}
品牌
,
$
{
seoParams
.
sort
}
价格
,
$
{
seoParams
.
sort
}
图片`
,
// eslint-disable-line
description
:
`潮流网购就上
YOHO
!
BUY
有货,有货网
$
{
seoParams
.
sort
}
专卖店提供
$
{
seoParams
.
sort
}
品牌、
$
{
seoParams
.
sort
}
价格、
$
{
seoParams
.
sort
}
图片等信息。销售正品新款
$
{
seoParams
.
sort
},
全场低至
4
折
,
★全场品牌正品保证
,
支持货到付款!★`
// eslint-disable-line
};
}
else
{
seoData
=
{
title
:
`【
$
{
genderName
}
$
{
seoParams
.
color
}
$
{
seoParams
.
senior
}
$
{
seoParams
.
brand
}
$
{
seoParams
.
sort
}
$
{
isNewArrival
?
'新品'
:
''
}
】
_
价格
,
图片
,
款式
-
YOHO
!
BUY
有货`
,
// eslint-disable-line
keywords
:
`
$
{
genderName
}
$
{
seoParams
.
color
}
$
{
seoParams
.
senior
}
$
{
seoParams
.
brand
}
$
{
seoParams
.
sort
}
`
,
// eslint-disable-line
description
:
`潮流网购就上
YOHO
!
BUY
有货,有货网
$
{
seoParams
.
sort
}
专卖店提供
$
{
seoParams
.
sort
}
品牌、
$
{
seoParams
.
sort
}
价格、
$
{
seoParams
.
sort
}
图片等信息。销售正品新款
$
{
seoParams
.
sort
},
全场低至
4
折
,
★全场品牌正品保证
,
支持货到付款!★`
// eslint-disable-line
};
}
}
return
seoData
;
};
...
...
Please
register
or
login
to post a comment