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
bc45f97dd2547665ce238391f91465d8fa36bffc
1 parent
90ebff4f
开通有货分期
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
5 deletions
apps/home/controllers/installment.js
apps/home/models/installment.js
apps/home/router.js
config/common.js
public/js/home/installment.starting-service.page.js
apps/home/controllers/installment.js
View file @
bc45f97
...
...
@@ -127,6 +127,27 @@ const startingService = (req, res) => {
});
};
const
activateService
=
(
req
,
res
,
next
)
=>
{
installmentModel
.
activateService
({
uid
:
req
.
user
.
uid
,
userName
:
req
.
body
.
userName
,
identityCardNo
:
req
.
body
.
identityCardNo
,
cardNo
:
req
.
body
.
cardNo
,
mobile
:
req
.
body
.
mobile
,
snsCheckCode
:
req
.
body
.
snsCheckCode
}).
then
((
result
)
=>
{
res
.
json
(
result
);
}).
catch
(
next
);
};
const
getBankInfo
=
(
req
,
res
,
next
)
=>
{
installmentModel
.
getBankInfo
({
cardNo
:
req
.
query
.
cardNo
}).
then
((
result
)
=>
{
res
.
json
(
result
);
}).
catch
(
next
);
};
const
verifyCode
=
(
req
,
res
,
next
)
=>
{
installmentModel
.
sendVerifyCode
(
req
.
user
.
uid
,
req
.
body
.
mobile
).
then
((
result
)
=>
{
res
.
json
(
result
);
...
...
@@ -137,5 +158,7 @@ module.exports = {
index
,
review
,
startingService
,
verifyCode
activateService
,
verifyCode
,
getBankInfo
};
...
...
apps/home/models/installment.js
View file @
bc45f97
...
...
@@ -137,11 +137,24 @@ const activateService = (params) => {
},
params
);
};
/**
* 获取银行信息
*
* @param cardNo
* @returns {*}
*/
const
getBankInfo
=
(
cardNo
)
=>
{
return
api
.
get
(
''
,
{
method
:
'user.instalment.getBankInfoByCardNo'
},
cardNo
);
};
module
.
exports
=
{
getStauts
,
getQueryCreditInfo
,
getQueryAmtInfo
,
getSearchIntallment
,
sendVerifyCode
,
activateService
activateService
,
getBankInfo
};
...
...
apps/home/router.js
View file @
bc45f97
...
...
@@ -17,4 +17,6 @@ router.get('/installment/index', installment.index);// 开通分期首页
router
.
get
(
'/installment/review'
,
installment
.
review
);
// 开通分期首页
router
.
get
(
'/installment/starting-service'
,
installment
.
startingService
);
// 分期付款开通
router
.
get
(
'/installment/starting-service/verify-code'
,
installment
.
verifyCode
);
router
.
get
(
'/installment/bank-info'
,
installment
.
getBankInfo
);
router
.
post
(
'/installment/activate-service'
,
installment
.
activateService
);
module
.
exports
=
router
;
...
...
config/common.js
View file @
bc45f97
...
...
@@ -15,8 +15,12 @@ module.exports = {
port
:
6001
,
siteUrl
:
'//m.yohobuy.com'
,
domains
:
{
api
:
'http://devapi.yoho.cn:58078/'
,
service
:
'http://devservice.yoho.cn:58077/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
// api: 'http://testapi.yoho.cn:28078/',
// 'http://testservice.yoho.cn:28077/'
api
:
'http://dev-api.yohops.com:9999/'
,
service
:
'http://dev-service.yohops.com:9999/'
},
subDomains
:
{
host
:
'.m.yohobuy.com'
,
...
...
public/js/home/installment.starting-service.page.js
View file @
bc45f97
...
...
@@ -121,5 +121,7 @@ $('input').on('change', function() {
* 表单提交
*/
$
(
'#apply-form'
).
submit
(
function
()
{
console
.
log
(
formModel
);
$
.
post
(
'/home/installment/activate-service'
,
formModel
).
then
((
result
)
=>
{
console
.
log
(
result
);
});
});
...
...
Please
register
or
login
to post a comment