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
陈峰
2017-03-10 10:00:20 +0800
Commit
bea40a869fc62120a7c65bc7dcca547fc75ed98d
2 parents
0040faba
5b6b2eb6
merge release/5.5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
142 additions
and
84 deletions
apps/home/models/coupons.js
apps/home/models/order.js
apps/home/models/orderDetail.js
apps/home/views/action/coupons.hbs
apps/home/views/action/orderDetail.hbs
config/common.js
doraemon/views/partial/order/order.hbs
public/hbs/home/coupons-list.hbs
public/scss/home/_order-detail.css
public/scss/home/coupons.page.css
apps/home/models/coupons.js
View file @
bea40a8
...
...
@@ -29,6 +29,7 @@ const couponData = (params) => {
}
);
}
else
if
(
status1
)
{
delete
elem
.
overState
;
elem
.
employbg
=
true
;
}
return
elem
;
...
...
apps/home/models/order.js
View file @
bea40a8
...
...
@@ -319,6 +319,29 @@ const getOrders = (params) => {
/* 是否是虚拟商品 */
let
isTickets
=
order
.
virtual_type
&&
parseInt
(
order
.
virtual_type
,
10
)
===
3
;
/* 修改地址按钮控制 */
let
modifyAddress
=
{
modifyAddress
:
false
,
modifyAddressUrl
:
''
};
if
(
_
.
find
(
value
.
links
,
o
=>
{
return
o
===
'modifyAddress'
;
}))
{
modifyAddress
.
modifyAddress
=
true
;
modifyAddress
.
modifyAddressUrl
=
helpers
.
urlFormat
(
'/home/orders/addressModify'
,
{
orderCode
:
value
.
order_code
,
areaCode
:
_
.
get
(
value
,
'delivery_address.area_code'
,
''
)
});
// 如果不允许修改省
if
(
value
.
is_support_change_province
!==
'Y'
&&
!
_
.
get
(
value
,
'delivery_address.province_area_code'
,
false
))
{
modifyAddress
.
modifyAddressUrl
+=
'&provinceAreaCode='
+
_
.
get
(
value
,
'delivery_address.province_area_code'
,
''
);
}
}
Object
.
assign
(
perOrder
,
{
orderNum
:
value
.
order_code
,
orderStatus
:
value
.
status_str
,
...
...
@@ -327,7 +350,8 @@ const getOrders = (params) => {
detailUrl
:
helpers
.
urlFormat
(
'/home/orderdetail'
,
{
order_code
:
value
.
order_code
}),
count
:
value
.
buy_total
,
isVirtual
:
isTickets
,
isDepositAdvance
:
value
.
attribute
*
1
===
9
// 定金预售
isDepositAdvance
:
value
.
attribute
*
1
===
9
,
// 定金预售
modifyAddress
:
modifyAddress
});
/* 如果运费大于0,会显示运费 */
...
...
apps/home/models/orderDetail.js
View file @
bea40a8
...
...
@@ -260,9 +260,15 @@ const orderDetailData = (uid, orderCode) => {
}
// 判断是否可以修改地址
if
(
orderDetail
.
canUpdateDeliveryAddress
===
'Y'
)
{
if
(
orderDetail
.
canUpdateDeliveryAddress
===
'Y'
&&
orderDetail
.
isSupportChangeProvince
===
'Y'
)
{
orderDetail
=
_
.
assign
(
orderDetail
,
{
changeable
:
true
changeable
:
true
,
addressModify
:
true
});
}
else
if
(
orderDetail
.
canUpdateDeliveryAddress
===
'Y'
&&
orderDetail
.
isSupportChangeProvince
!==
'Y'
)
{
orderDetail
=
_
.
assign
(
orderDetail
,
{
changeable
:
false
,
addressModify
:
true
});
}
...
...
@@ -286,13 +292,19 @@ const orderDetailData = (uid, orderCode) => {
orderDetail
=
_
.
assign
(
orderDetail
,
{
goodsAmount
:
orderDetail
.
paymentAmount
,
url
:
'/home/orders/addressModify?orderCode='
+
orderCode
+
'&areaCode='
+
orderDetail
.
areaCode
newUrl
:
helpers
.
urlFormat
(
'/home/orders/addressModify'
,
{
orderCode
:
orderCode
,
areaCode
:
orderDetail
.
areaCode
}),
url
:
helpers
.
urlFormat
(
'/home/addressModify'
,
{
orderCode
:
orderCode
,
areaCode
:
orderDetail
.
areaCode
})
});
// 如果允许修改省
if
(
orderDetail
.
isSupportChangeProvince
===
'Y'
&&
orderDetail
.
provinceAreaCode
)
{
orderDetail
.
url
=
orderDetail
.
url
+
'&provinceAreaCode='
+
orderDetail
.
provinceAreaCode
;
// 如果不允许修改省
if
(
orderDetail
.
isSupportChangeProvince
!==
'Y'
&&
orderDetail
.
provinceAreaCode
)
{
orderDetail
.
newUrl
=
orderDetail
.
newUrl
+
'&provinceAreaCode='
+
orderDetail
.
provinceAreaCode
;
}
// 为支付的拆单配送信息
...
...
apps/home/views/action/coupons.hbs
View file @
bea40a8
...
...
@@ -47,8 +47,7 @@
{{#if
sortNameLimits
}}
<p>
限品类:
{{
sortNameLimits
}}
</p>
{{/if}}
<p>
特例商品(秒杀、限定、境外、预售
{{#if
isDiscount
}}
、3折以下
{{/if}}{{#if
isDiscount
}}
、限量
{{/if}}
等)暂不支持使用优惠券。
</p>
<p>
特例商品(秒杀、限定、境外、预售
{{#if
isDiscount
}}
、3折以下
{{/if}}{{#if
isLimited
}}
、限量
{{/if}}
等)暂不支持使用优惠券。
</p>
{{#if
explains
}}
<p>
说明:
{{
explains
}}
</p>
{{/if}}
</div>
</div>
...
...
apps/home/views/action/orderDetail.hbs
View file @
bea40a8
...
...
@@ -22,7 +22,7 @@
{{
addressAll
}}
</p>
<div
class=
"rest"
>
其他地址
<span
class=
"iconfont icon
A
ddress"
>

</span></div>
<div
class=
"rest"
>
其他地址
<span
class=
"iconfont icon
-a
ddress"
>

</span></div>
</div>
</section>
...
...
@@ -108,7 +108,24 @@
</ul>
{{/
invoice
}}
{{#if
unpaid
}}
<div
class=
"clock"
>
<ul
class=
"count-down hide"
>
<li>
<span
class=
"iconfont count-down-icon"
>

</span>
</li>
<li>
<span
class=
"hours"
>
{{
leftTime
}}
</span>
</li>
</ul>
</div>
{{/if}}
<div
class=
"opt block"
>
{{!-- 修改地址 --}}
{{#if
addressModify
}}
<a
href=
"
{{
newUrl
}}
"
class=
"btn"
>
修改地址
</a>
{{/if}}
{{#if
isDepositAdvance
}}
<div
class=
"order-opt"
>
<span
class=
"order-opt-info"
>
请到App完成订单相关操作
</span>
...
...
@@ -126,19 +143,9 @@
{{/
unless
}}
{{#if
unpaid
}}
<ul
class=
"count-down hide"
>
<li>
<span
class=
"iconfont count-down-icon"
>

</span>
</li>
<li>
<span
class=
"hours"
>
{{
leftTime
}}
</span>
</li>
</ul>
<span
class=
"btn btn-cancel"
>
取消订单
</span>
{{#if
payUrl
}}
<a
href=
"
{{
payUrl
}}
"
>
<span
class=
"btn btn-pay"
>
立即付款
</span>
</a>
<a
class=
"btn btn-pay"
href=
"
{{
payUrl
}}
"
>
立即付款
</a>
{{/if}}
{{/if}}
...
...
config/common.js
View file @
bea40a8
...
...
@@ -14,6 +14,12 @@ const domains = {
service
:
'http://service-test3.yohops.com:9999/'
,
liveApi
:
'http://testapi.live.yohops.com:9999/'
,
singleApi
:
'http://api-test3.yohops.com:9999/'
,
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
imSocket
:
'wss://imsocket.yohobuy.com:443'
,
imCs
:
'https://imhttp.yohobuy.com/api'
,
imServer
:
'https://imhttp.yohobuy.com/server'
...
...
doraemon/views/partial/order/order.hbs
View file @
bea40a8
...
...
@@ -42,6 +42,12 @@
{{#if
refundApply
}}
<span
class=
"btn refund"
>
申请退款
</span>
{{/if}}
{{!-- 修改地址 --}}
{{#if
modifyAddress
.
modifyAddress
}}
<a
class=
"btn"
href=
"
{{
modifyAddress
.
modifyAddressUrl
}}
"
>
<span>
修改地址
</span>
</a>
{{/if}}
</div>
{{/
unless
}}
{{/
unless
}}
...
...
public/hbs/home/coupons-list.hbs
View file @
bea40a8
{{#
each
list
}}
<div
class=
"coupon-group"
data-coupon-id=
{{
couponId
}}
>
<div
class=
"coupon-header"
>
{{
couponDetailInfomation
}}
</div>
<div
class=
"coupon-content"
>
<div
class=
"coupon-content-group1"
>
<p
class=
"coupon-money"
>
{{
couponValue
}}
</p>
<p>
{{
rule4ShortName
}}
</p>
</div>
<div
class=
"coupon-content-group2"
>
<div
class=
"coupon-content-group2-table"
>
<div>
{{
couponValidity
}}
{{#if
overState
}}
<span
class=
"coupon-soon-expire"
>
(
{{
overState
}}
)
</span>
{{/if}}
</div>
<div>
<div
class=
"left down info-btn"
>
详细信息
<i
class=
"iconfont"
></i></div>
<div
class=
"right"
>
{{#if
employbg
}}
<span
class=
"employ"
></span>
{{else
if
bestowLink
}}
<a
href=
"javascript:void(0);"
data-link=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
{{/if}}
<div
class=
"coupon-group"
data-coupon-id=
{{
couponId
}}
>
<div
class=
"coupon-header"
>
{{
couponDetailInfomation
}}
</div>
<div
class=
"coupon-content"
>
<div
class=
"coupon-content-group1"
>
<p
class=
"coupon-money"
>
{{
couponValue
}}
</p>
<p>
{{
rule4ShortName
}}
</p>
</div>
<div
class=
"coupon-content-group2"
>
<div
class=
"coupon-content-group2-table"
>
<div>
{{
couponValidity
}}
{{#if
overState
}}
<span
class=
"coupon-soon-expire"
>
(
{{
overState
}}
)
</span>
{{/if}}
</div>
<div>
<div
class=
"left down info-btn"
>
详细信息
<i
class=
"iconfont"
></i></div>
<div
class=
"right"
>
{{#if
employbg
}}
<span
class=
"employ"
></span>
{{else
if
bestowLink
}}
<a
href=
"javascript:void(0);"
data-link=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
{{/if}}
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"coupon-footer hide"
>
{{#if
isNoLimit
}}
<p>
全场通用
</p>
{{/if}}
<div
class=
"coupon-footer hide"
>
{{#if
isNoLimit
}}
<p>
全场通用
</p>
{{/if}}
{{#if
brandNameLimits
}}
<p>
限品牌:
{{
brandNameLimits
}}
</p>
{{/if}}
{{#if
brandNameLimits
}}
<p>
限品牌:
{{
brandNameLimits
}}
</p>
{{/if}}
{{#if
sortNameLimits
}}
<p>
限品类:
{{
sortNameLimits
}}
</p>
{{/if}}
{{#if
sortNameLimits
}}
<p>
限品类:
{{
sortNameLimits
}}
</p>
{{/if}}
<p>
特例商品(秒杀、限定、境外、预售
{{#if
isDiscount
}}
、3折以下
{{/if}}{{#if
isDiscount
}}
、限量
{{/if}}
等)暂不支持使用优惠券。
</p>
{{#if
explains
}}
<p>
说明:
{{
explains
}}
</p>
{{/if}}
<p>
特例商品(秒杀、限定、境外、预售
{{#if
isDiscount
}}
、3折以下
{{/if}}{{#if
isLimited
}}
、限量
{{/if}}
等)暂不支持使用优惠券。
</p>
{{#if
explains
}}
<p>
说明:
{{
explains
}}
</p>
{{/if}}
</div>
</div>
</div>
{{/
each
}}
...
...
public/scss/home/_order-detail.css
View file @
bea40a8
...
...
@@ -109,7 +109,7 @@
color
:
#f00
;
font-size
:
24px
;
.icon
A
ddress
{
.icon
-a
ddress
{
position
:
static
;
font-size
:
24px
;
}
...
...
@@ -201,33 +201,36 @@
font-size
:
24px
;
}
.count-down
{
list-style
:
none
;
padding
:
0
;
display
:
inline-block
;
text-align
:
right
;
font-size
:
24px
;
color
:
#b0b0b0
;
float
:
left
;
margin-left
:
30px
;
margin-top
:
20px
;
.clock
{
width
:
100%
;
height
:
52px
;
background-color
:
#787878
;
text-align
:
center
;
.count-down-icon
{
margin-top
:
-8px
;
font-size
:
30px
;
}
.count-down
{
list-style
:
none
;
line-height
:
56px
;
display
:
inline-block
;
font-size
:
24px
;
color
:
#fff
;
&
.hide
{
display
:
none
;
}
.count-down-icon
{
margin-top
:
-8px
;
font-size
:
30px
;
}
li
{
display
:
inline-block
;
}
&
.hide
{
display
:
none
;
}
li
span
{
font-size
:
24px
;
line-height
:
24px
;
li
{
display
:
inline-block
;
}
li
span
{
font-size
:
24px
;
line-height
:
24px
;
}
}
}
...
...
public/scss/home/coupons.page.css
View file @
bea40a8
...
...
@@ -45,7 +45,7 @@
.coupon-content
{
border-radius
:
0
0
10px
10px
;
height
:
140px
;
border-top
:
1
px
dashed
#e53333
;
border-top
:
2
px
dashed
#e53333
;
display
:
table
;
padding
:
15px
0
;
background-color
:
#f06a6b
;
...
...
@@ -129,7 +129,7 @@
display
:
block
;
z-index
:
2
;
right
:
37px
;
margin-top
:
-9
0
px
;
margin-top
:
-9
5
px
;
background-image
:
resolve
(
"home/employ.png"
);
background-size
:
cover
;
}
...
...
@@ -139,7 +139,7 @@
.coupon-footer
{
background-color
:
#f06a6b
;
padding
:
20px
;
font-size
:
20
px
;
font-size
:
18
px
;
border-radius
:
10px
;
color
:
#fff
;
border-top
:
1px
dashed
#fff
;
...
...
Please
register
or
login
to post a comment