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
Aiden Xu
9 years ago
Commit
6d9bf5a898e4a4c4d894e1ab8d2d79ad56d580e8
2 parents
27693d9b
b3349c72
Merge remote-tracking branch 'origin/feature/installment' into feature/installment
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
18 deletions
apps/home/controllers/installment.js
apps/home/views/action/installment/repayment-list.hbs
apps/home/views/partial/installment/repayment-bottom.hbs
config/common.js
doraemon/views/layout.hbs
public/js/home/repayment-list.page.js
public/js/home/repayment.js
apps/home/controllers/installment.js
View file @
6d9bf5a
...
...
@@ -65,6 +65,8 @@ const index = (req, res, next) => {
// status:0 未申请 1审核中 2已开通 3 审核未通过
let
openStatus
=
result
[
0
];
openStatus
=
'2'
;
if
(
openStatus
===
'0'
)
{
return
installmentModel
.
getResources
().
then
(
data
=>
{
return
{
...
...
apps/home/views/action/installment/repayment-list.hbs
View file @
6d9bf5a
...
...
@@ -9,7 +9,7 @@
{{#
data
}}
<ul
class=
"repay-list"
>
{{#
each
repaymentList
}}
<li
data-currfee=
"
{{
currFee
}}
"
data-curr
NoFeeAmt=
"
{{
currNoFeeAmt
}}
"
data-curramt=
"
{{
currAmt
}}
"
data-billno=
"
{{
billNo
}}
"
data-termN
o=
{{
currTerm
}}
>
<li
data-currfee=
"
{{
currFee
}}
"
data-curr
nofeeamt=
"
{{
currNoFeeAmt
}}
"
data-curramt=
"
{{
currAmt
}}
"
data-bill=
"
{{
billNo
}}
"
data-termn
o=
{{
currTerm
}}
>
<input
id=
"list-
{{
billNo
}}
"
type=
"checkbox"
class=
"installment-check-btn"
{{#if
isChecked
}}
checked
{{/if}}
/>
<label
for=
"list-
{{
billNo
}}
"
>
<div
class=
"cont"
>
...
...
apps/home/views/partial/installment/repayment-bottom.hbs
View file @
6d9bf5a
...
...
@@ -17,5 +17,5 @@
<p
class=
"repay-price"
>
待支付:
<span>
¥
<span
class=
"curr-amt"
>
{{
round
currAmtCount
}}
</span></span></p>
<p
class=
"serve-price"
{{#if
isCurrFee
}}
style=
"display:block;"
{{/if}}
>
含服务费¥
<span
class=
"curr-fee"
>
{{
round
currFeeCount
}}
</span></p>
</label>
<a
href=
""
class=
"repayment-btn"
>
立即还款
</a>
</div>
<a
href=
''
class=
"repayment-btn"
>
立即还款
</a>
</div>
\ No newline at end of file
...
...
config/common.js
View file @
6d9bf5a
...
...
@@ -42,9 +42,9 @@ module.exports = {
// master: ['192.168.102.205:12111'],
// slave: ['192.168.102.205:12111'],
// session: ['192.168.102.205:12111'],
master
:
[
'127.0.0.1:11211'
],
slave
:
[
'127.0.0.1:11211'
],
session
:
[
'127.0.0.1:11211'
],
master
:
[
'192.168.102.205:12111'
],
slave
:
[
'192.168.102.205:12111'
],
session
:
[
'192.168.102.205:12111'
],
timeout
:
1000
,
retries
:
0
},
...
...
doraemon/views/layout.hbs
View file @
6d9bf5a
...
...
@@ -18,7 +18,7 @@
(
function
(
d
,
c
){
var
e
=
d
.
documentElement
,
a
=
"orientationchange"
in
window
?
"orientationchange"
:
"resize"
,
b
=
function
(){
var
f
=
e
.
clientWidth
;
if
(
!
f
){
return
}
if
(
f
>=
640
){
e
.
style
.
fontSize
=
"40px"
}
else
{
e
.
style
.
fontSize
=
40
*
(
f
/
640
)
+
"px"
}};
if
(
!
d
.
addEventListener
){
return
}
b
();
c
.
addEventListener
(
a
,
b
,
false
);
d
.
addEventListener
(
"DOMContentLoaded"
,
b
,
false
)})(
document
,
window
);
</script>
{{#if
devEnv
}}
<link
rel=
"stylesheet"
href=
"//172.16.
11.32
:5001/css/index.css"
>
<link
rel=
"stylesheet"
href=
"//172.16.
6.180
:5001/css/index.css"
>
{{^}}
<link
rel=
"stylesheet"
href=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/index.css"
>
{{/if}}
...
...
@@ -41,8 +41,8 @@
<script
type=
"text/javascript"
src=
"//res.wx.qq.com/open/js/jweixin-1.1.0.js"
></script>
{{/
wechatShare
}}
{{#if
devEnv
}}
<script
src=
"//172.16.11.32:5001/libs.js"
></script>
<script
src=
"//172.16.11.32:5001/
{{
module
}}
.
{{
page
}}
.js"
></script>
<script
src=
"//172.16.6.180:5001/libs.js"
></script>
<script
src=
"//172.16.6.180:5001/
{{
module
}}
.
{{
page
}}
.js"
></script>
{{^}}
<script
src=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/libs.js"
></script>
<script
src=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/
{{
module
}}
.
{{
page
}}
.js"
></script>
...
...
public/js/home/repayment-list.page.js
View file @
6d9bf5a
...
...
@@ -15,13 +15,12 @@ var repayment = new Repayment({
$
(
`
$
{
CHECKBOX_SELECTOR
}
:
checked
`
).
each
(
function
(
key
,
item
)
{
var
li
=
$
(
item
).
parents
(
'li'
);
var
data
=
{
index
:
li
.
index
(),
orderCode
:
li
.
attr
(
'data-billno'
),
termNo
:
li
.
attr
(
'data-termNo'
),
amount
:
parseFloat
(
li
.
attr
(
'data-currNoFeeAmt'
)),
fee
:
parseFloat
(
li
.
attr
(
'data-currfee'
))
+
0
orderCode
:
li
.
data
(
'bill'
),
termNo
:
li
.
data
(
'termno'
),
amount
:
parseFloat
(
li
.
data
(
'currnofeeamt'
)),
fee
:
parseFloat
(
li
.
data
(
'currfee'
))
+
0
};
ret
.
push
(
data
);
...
...
@@ -29,6 +28,9 @@ var repayment = new Repayment({
return
ret
;
},
onGetSelectableCount
:
function
()
{
return
$
(
CHECKBOX_SELECTOR
).
length
;
},
onDeselectAll
:
function
()
{
$
(
`
$
{
CHECKBOX_SELECTOR
}
:
checked
`
).
prop
(
'checked'
,
false
);
return
[];
...
...
@@ -65,7 +67,4 @@ $(CHECKBOX_SELECTOR + ':checkbox').click(function() {
repayment
.
update
();
});
// 跳转到还款详情
window
.
jumpDetail
=
function
(
id
)
{
location
.
href
=
'/home/installment/repay/detail?id='
+
id
;
};
repayment
.
update
();
...
...
public/js/home/repayment.js
View file @
6d9bf5a
...
...
@@ -165,4 +165,9 @@ Repayment.prototype.update = function() {
}
};
// 跳转到还款详情
window
.
jumpDetail
=
function
(
id
)
{
location
.
href
=
'/home/installment/repay/detail?id='
+
id
;
};
module
.
exports
=
Repayment
;
...
...
Please
register
or
login
to post a comment