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
Email Patches
Plain Diff
Browse Files
Authored by
Aiden Xu
9 years ago
Commit
6a8a3902b1f8963e9e7acfd6f30b46838cdeb17a
1 parent
7185c76a
分期订单
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
58 deletions
apps/home/controllers/installment.js
apps/home/views/action/installment/order-list.hbs
apps/home/views/action/installment/order.hbs
public/js/home/installment.order.page.js
public/scss/home/installment/_index.css
public/scss/home/installment/_order.css
public/scss/home/installment/_repayment-list.css
apps/home/controllers/installment.js
View file @
6a8a390
...
...
@@ -255,11 +255,12 @@ const orderIndex = (req, res) => {
module
:
'home'
,
page
:
'installment.order'
,
title
:
'我的分期订单'
,
navBtn
:
false
navBtn
:
false
,
isInstallmentPage
:
true
});
};
const
orderList
=
(
req
,
res
)
=>
{
const
orderList
=
(
req
,
res
,
next
)
=>
{
const
params
=
{
uid
:
req
.
user
.
uid
||
8041876
,
// TODO: fix me
type
:
req
.
query
.
type
||
1
,
...
...
@@ -270,13 +271,14 @@ const orderList = (req, res) => {
installmentModel
.
getInstallmentOrders
(
params
).
then
((
result
)
=>
{
res
.
render
(
'installment/order-list'
,
{
title
:
'我的分期订单'
,
orders
:
result
.
data
.
orderList
,
layout
:
false
orders
:
result
.
data
?
result
.
data
.
orderList
:
[],
layout
:
false
,
isInstallmentPage
:
true
});
});
})
.
catch
(
next
)
;
};
const
orderDetail
=
(
req
,
res
)
=>
{
const
orderDetail
=
(
req
,
res
,
next
)
=>
{
const
params
=
{
uid
:
req
.
user
.
id
||
8041876
,
// TODO: fix me
orderCode
:
req
.
params
.
id
...
...
@@ -309,7 +311,7 @@ const orderDetail = (req, res) => {
}
}
});
});
})
.
catch
(
next
)
;
};
// 还款详情
...
...
apps/home/views/action/installment/order-list.hbs
View file @
6a8a390
{{#
each
orders
}}
<li>
<a
href=
"/home/installment/order/
{{
orderCode
}}
"
>
{{#
orderGoods
}}
<div
class=
"image-box"
>
<img
src=
"
{{
image
goodsImage
90
120
}}
"
alt=
"
{{
productName
}}
"
>
</div>
<div
class=
"title-box"
>
<div>
{{
productName
}}
</div>
<div
class=
"date-box"
>
{{
..
/
createTime
}}
</div>
</div>
{{/
orderGoods
}}
</a>
{{#if
orders
}}
{{#
each
orders
}}
<li>
<a
href=
"/home/installment/order/
{{
orderCode
}}
"
>
{{#
orderGoods
}}
<div
class=
"image-box"
>
<img
src=
"
{{
image
goodsImage
90
120
}}
"
alt=
"
{{
productName
}}
"
>
</div>
<div
class=
"title-box"
>
<div
class=
"product-name"
>
{{
productName
}}
</div>
<div
class=
"date-box"
>
{{
..
/
createTime
}}
</div>
</div>
{{/
orderGoods
}}
</a>
<div
class=
"right-box"
>
<div
class=
"amount"
>
¥
{{
amount
}}
</div>
<div
class=
"status"
>
{{
installStatus
}}
</div>
</div>
<div
class=
"clearfix"
></div>
</li>
{{/
each
}}
{{/if}}
<div
class=
"right-box"
>
<div
class=
"amount"
>
¥
{{
amount
}}
</div>
<div
class=
"status"
>
{{
installStatus
}}
</div>
</div>
<div
class=
"clearfix"
></div>
</li>
{{/
each
}}
...
...
apps/home/views/action/installment/order.hbs
View file @
6a8a390
<div
class=
"installment-order-page"
>
<div
class=
"
repayment-list-page
installment-order-page"
>
{{>
resources
/
banner-top
}}
<ul
class=
"header-tab"
>
<li
class=
"active"
>
...
...
@@ -15,5 +15,10 @@
<div
class=
"order-list-container"
>
<ul
id=
"order-list"
class=
"order-list"
>
</ul>
<div
id=
"no-result"
class=
"no-result"
style=
"display: none;"
>
<i
class=
"result-icon"
></i>
<p
class=
"txt"
>
暂无分期订单记录
</p>
<a
href=
"/product/new"
class=
"guang-btn"
>
去逛逛
</a>
</div>
</div>
</div>
...
...
public/js/home/installment.order.page.js
View file @
6a8a390
...
...
@@ -33,6 +33,14 @@ var loadOrderList = function(pageIndex, type) {
$
(
this
).
addClass
(
'faded'
);
}
});
if
(
$
(
'#order-list li'
).
length
===
0
)
{
$
(
'#no-result'
).
show
();
$
(
'#order-list'
).
hide
();
}
else
{
$
(
'#order-list'
).
show
();
$
(
'#no-result'
).
hide
();
}
});
}
};
...
...
public/scss/home/installment/_index.css
View file @
6a8a390
...
...
@@ -2,3 +2,31 @@
@import
"starting-service"
;
@import
"repayment-list"
;
@import
"order"
;
.no-result
{
.result-icon
{
width
:
153px
;
height
:
197px
;
background
:
resolve
(
"home/review-img-3.png"
)
no-repeat
;
background-size
:
contain
;
margin
:
198px
auto
36px
;
display
:
block
;
}
.txt
{
text-align
:
center
;
color
:
#444
;
}
.guang-btn
{
width
:
472px
;
height
:
88px
;
background
:
#444
;
color
:
#fff
;
text-align
:
center
;
line-height
:
88px
;
border-radius
:
6px
;
margin
:
110px
auto
0
;
display
:
block
;
}
}
...
...
public/scss/home/installment/_order.css
View file @
6a8a390
...
...
@@ -57,8 +57,14 @@
.title-box
{
margin-left
:
22px
;
width
:
240px
;
overflow
:
hidden
;
width
:
320px
;
.product-name
{
overflow
:
hidden
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
}
.date-box
{
...
...
public/scss/home/installment/_repayment-list.css
View file @
6a8a390
...
...
@@ -124,34 +124,6 @@
}
}
.no-result
{
.result-icon
{
width
:
153px
;
height
:
197px
;
background
:
resolve
(
"home/review-img-3.png"
)
no-repeat
;
background-size
:
contain
;
margin
:
198px
auto
36px
;
display
:
block
;
}
.txt
{
text-align
:
center
;
color
:
#444
;
}
.guang-btn
{
width
:
472px
;
height
:
88px
;
background
:
#444
;
color
:
#fff
;
text-align
:
center
;
line-height
:
88px
;
border-radius
:
6px
;
margin
:
110px
auto
0
;
display
:
block
;
}
}
.repay-now
{
width
:
100%
;
background
:
#fff
;
...
...
Please
register
or
login
to post a comment