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
Email Patches
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
76f2c6aac234221cf89bf05405b81885e838a61a
1 parent
8d56af68
update for order time is up
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
18 deletions
apps/me/models/order.js
apps/me/views/partial/order/table-body.hbs
public/js/me/order/countdown.js
apps/me/models/order.js
View file @
76f2c6a
...
...
@@ -141,7 +141,7 @@ const isMobileOrder = {
// 转换时间戳
const
_convertUnixTime
=
src
=>
{
return
moment
.
unix
(
src
).
format
(
'YYYY-MM-DD
HH
:mm:ss'
);
return
moment
.
unix
(
src
).
format
(
'YYYY-MM-DD
hh
:mm:ss'
);
};
/**
...
...
@@ -264,7 +264,6 @@ const _getUserOrder = (uid, type, page) => {
orderList
.
forEach
(
item
=>
{
const
ot
=
parseInt
(
item
.
orderType
,
10
);
const
st
=
parseInt
(
item
.
status
,
10
);
const
payleftTime
=
parseInt
(
item
.
payLefttime
,
10
);
let
hasRefund
=
false
;
let
canRefund
=
false
;
...
...
@@ -294,7 +293,7 @@ const _getUserOrder = (uid, type, page) => {
// 没有取消订单并且状态为0的时候显示付款按钮
if
(
item
.
isCancel
===
'N'
&&
st
===
0
&&
payleftTime
!==
0
)
{
st
===
0
)
{
item
.
showPayButton
=
true
;
}
...
...
@@ -316,10 +315,6 @@ const _getUserOrder = (uid, type, page) => {
if
(
item
.
isCancel
===
'Y'
)
{
item
.
showBuyBtn
=
true
;
item
.
statusStr
=
'已取消'
;
}
else
if
(
payleftTime
===
0
)
{
item
.
showBuyBtn
=
true
;
item
.
showPayButton
=
false
;
item
.
statusStr
=
'已取消'
;
}
else
if
(
item
.
isOnlinePaid
)
{
item
.
statusStr
=
statusMap
[
st
].
valueStr
;
}
...
...
@@ -440,13 +435,11 @@ const getOrderData = (uid, type, page) => {
},
2
:
{
emptyMsg
:
'没有待付款的订单哦~'
,
showEmptyEn
:
true
,
btnText
:
'查看全部订单'
,
url
:
'/me/'
},
3
:
{
emptyMsg
:
'没有待收货的订单哦~'
,
showEmptyEn
:
true
,
btnText
:
'查看全部订单'
,
url
:
'/me/'
}
...
...
@@ -548,14 +541,6 @@ const getOrderDetail = (uid, code) => {
detail
.
invoice
=
false
;
}
if
(
detail
.
payLefttime
===
'0'
)
{
detail
.
showLeftTime
=
false
;
detail
.
statusStr
=
'已取消'
;
detail
.
steps
=
false
;
detail
.
btns
=
false
;
}
detail
.
paymentTypeStr
=
paymentTypeStr
[
detail
.
paymentType
];
detail
.
allAddress
=
detail
.
area
+
detail
.
address
;
...
...
apps/me/views/partial/order/table-body.hbs
View file @
76f2c6a
...
...
@@ -27,7 +27,7 @@
<span
class=
"btn red hide-when-invalid"
>
立即付款
</span>
</a>
{{/if}}
<p
class=
"subtext cancel
hide-when-invalid
"
>
取消订单
</p>
<p
class=
"subtext cancel"
>
取消订单
</p>
</div>
{{/if}}
{{#if
showEditOption
}}
...
...
public/js/me/order/countdown.js
View file @
76f2c6a
...
...
@@ -32,6 +32,7 @@ module.exports = {
if
(
src
<=
0
)
{
timeStr
=
'已失效'
;
$
(
'.hide-when-invalid'
).
hide
();
$
(
'.user-order .table .common-column .pay-operation .left-time'
).
css
(
'margin-left'
,
'0'
);
return
timeStr
;
}
...
...
Please
register
or
login
to post a comment