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
郝肖肖
8 years ago
Commit
585a3bf7e224232068e71bf65cf03af324f96aae
2 parents
c6e20322
5caa8d2f
Merge branch 'feature/orderDetailOptim' into release/wap-optim
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
20 deletions
apps/home/controllers/orderDetail.js
apps/home/models/orderDetail.js
apps/passport/controllers/login.js
public/js/home/order-detail.page.js → public/js/home/orderDetail.page.js
public/js/passport/register/password.js
public/scss/home/_order-detail-index.css
apps/home/controllers/orderDetail.js
View file @
585a3bf
...
...
@@ -21,15 +21,14 @@ const orderDetailData = (req, res, next) => {
orderDetailModel
.
orderDetailData
(
uid
,
orderCode
).
then
(
result
=>
{
result
.
serviceUrl
=
serviceUrl
;
res
.
render
(
'orderDetail'
,
{
module
:
'home'
,
page
:
'order-detail'
,
pageHeader
:
headerModel
.
setNav
({
navTitle
:
'订单详情'
,
navBtn
:
false
}),
title
:
'订单详情'
,
pageFooter
:
true
,
orderDetail
:
result
orderDetail
:
result
,
localCss
:
true
,
});
}).
catch
(
next
);
...
...
apps/home/models/orderDetail.js
View file @
585a3bf
...
...
@@ -199,10 +199,6 @@ const orderDetailData = (uid, orderCode) => {
// createTime: date('Y-m-d H:i:s', orderDetail.createTime)
});
// _.defer(function(orderDetail.createTime) {
// console.log(_.now() - orderDetail.createTime);
// }, _.now());
if
(
orderDetail
.
counterFlag
&&
orderDetail
.
counterFlag
===
'Y'
)
{
orderDetail
=
_
.
assign
(
orderDetail
,
{
leftTime
:
parseInt
(
orderDetail
.
payLefttime
,
10
)
*
1000
...
...
@@ -216,7 +212,7 @@ const orderDetailData = (uid, orderCode) => {
obj
=
_
.
assign
(
obj
,
{
thumb
:
data
.
goodsImage
,
name
:
data
.
productName
,
color
:
data
.
factoryColorName
?
data
.
factoryColorName
:
data
.
colorName
,
color
:
data
.
factoryColorName
?
data
.
factoryColorName
:
data
.
colorName
,
size
:
data
.
sizeName
,
price
:
data
.
goodsPrice
,
count
:
count
...
...
@@ -313,12 +309,8 @@ const orderDetailData = (uid, orderCode) => {
cancelReason
:
resons
});
//console.log(orderDetail)
return
orderDetail
;
});
// return orderDetail;
}
else
{
logger
.
error
(
'detail info return no 200'
);
return
{};
...
...
apps/passport/controllers/login.js
View file @
585a3bf
...
...
@@ -285,7 +285,8 @@ const wechat = {
doPassportCallback
(
openId
,
nickname
,
'wechat'
,
req
,
res
).
catch
(
next
);
})(
req
,
res
,
next
);
}
else
{
return
next
(
'Auth State Mismatch'
);
log
.
error
(
'Auth State Mismatch:'
+
req
.
originalUrl
);
return
res
.
redirect
(
loginPage
);
}
}
};
...
...
@@ -310,7 +311,8 @@ const sina = {
doPassportCallback
(
openId
,
nickname
,
'sina'
,
req
,
res
).
catch
(
next
);
})(
req
,
res
,
next
);
}
else
{
return
next
(
'Auth State Mismatch'
);
log
.
error
(
'Auth State Mismatch:'
+
req
.
originalUrl
);
return
res
.
redirect
(
loginPage
);
}
}
};
...
...
@@ -336,7 +338,8 @@ const qq = {
doPassportCallback
(
openId
,
nickname
,
'qq'
,
req
,
res
).
catch
(
next
);
})(
req
,
res
,
next
);
}
else
{
return
next
(
'Auth State Mismatch'
+
req
.
originalUrl
);
log
.
error
(
'Auth State Mismatch:'
+
req
.
originalUrl
);
return
res
.
redirect
(
loginPage
);
}
}
};
...
...
public/js/home/order
-d
etail.page.js → public/js/home/order
D
etail.page.js
View file @
585a3bf
...
...
@@ -4,6 +4,8 @@
* @date: 2015/11/16
*/
require
(
'../../scss/home/_order-detail-index.css'
);
var
$
=
require
(
'yoho-jquery'
),
lazyLoad
=
require
(
'yoho-jquery-lazyload'
),
Hammer
=
require
(
'yoho-hammer'
),
...
...
@@ -26,8 +28,6 @@ lazyLoad({
try_again_css
:
'order-failure'
});
require
(
'../common'
);
function
downCount
(
options
)
{
var
difference
=
options
,
// difference of dates
...
...
@@ -214,10 +214,8 @@ $reaMask.on('touchend', function(event) {
event
.
stopPropagation
();
});
function
formatDate
(
objD
)
{
var
str
,
colorhead
,
colorfoot
,
var
str
,
yy
=
objD
.
getYear
(),
MM
=
objD
.
getMonth
()
+
1
,
dd
=
objD
.
getDate
(),
...
...
@@ -252,4 +250,5 @@ function formatDate(objD) {
str
=
yy
+
'-'
+
MM
+
'-'
+
dd
+
' '
+
hh
+
':'
+
mm
+
':'
+
ss
;
$
(
'.createTime'
).
text
(
str
);
}
formatDate
(
$createTime
);
...
...
public/js/passport/register/password.js
View file @
585a3bf
...
...
@@ -65,6 +65,7 @@ $('.pitch').on('click', function() {
});
function
setPassword
()
{
$btnSure
.
addClass
(
'disable'
);
return
$
.
ajax
({
type
:
'POST'
,
url
:
'/passport/reg/setpassword'
,
...
...
@@ -96,8 +97,12 @@ function setPassword() {
location
.
href
=
res
.
href
;
},
1500
);
}
else
{
$btnSure
.
removeClass
(
'disable'
);
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
$btnSure
.
removeClass
(
'disable'
);
}
});
}
...
...
@@ -114,6 +119,7 @@ $btnSure.on('touchstart', function() {
}
else
{
if
(
$
(
'.pitch'
).
hasClass
(
'select'
))
{
setPassword
();
}
else
{
$
(
'.prompt'
).
show
();
...
...
public/scss/home/_order-detail-index.css
0 → 100644
View file @
585a3bf
@import
"order"
;
@import
"order-detail"
;
...
...
Please
register
or
login
to post a comment