Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
12226915
Commit
12226915
authored
Jun 13, 2019
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix loan_recommend bug
parent
93726b71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
20 deletions
+33
-20
product.js
app/router/product.js
+2
-2
product.js
app/service/gjj/product.js
+26
-15
config.local.js
config/config.local.js
+5
-3
No files found.
app/router/product.js
View file @
12226915
...
...
@@ -4,7 +4,7 @@ module.exports = app => {
const
router
=
app
.
router
.
namespace
(
app
.
config
.
projectRootPath
+
'/product'
);
router
.
get
(
'
third_options'
,
'
/recommend/channel/options/:type'
,
'gjj.product.getOptionProducts'
);
// 筛选项
router
.
get
(
'
third_options'
,
'
/recommend/channel/home'
,
'gjj.product.getLoanHomeRecommendList'
);
// 贷款频道首页
router
.
get
(
'/recommend/channel/options/:type'
,
'gjj.product.getOptionProducts'
);
// 筛选项
router
.
get
(
'/recommend/channel/home'
,
'gjj.product.getLoanHomeRecommendList'
);
// 贷款频道首页
};
app/service/gjj/product.js
View file @
12226915
...
...
@@ -84,22 +84,32 @@ class ProductService extends Service {
_children
:
[],
};
const
children
=
[{
id
:
-
2
,
title
:
'全部'
,
quality
:
credit_loans_ids
,
normal
:
common_loans_ids
}];
if
(
user_id
&&
app_user_id
)
{
children
.
push
({
id
:
-
3
,
title
:
'最适合您的'
,
quality
:
await
this
.
getSuitLoans
(),
normal
:
common_loans_ids
,
});
if
(
app_user_id
)
{
const
userGjj
=
await
ctx
.
helper
.
send_request
(
this
.
config
.
NODE_BASE_URL
+
'/cassandra-server/gjj/list/'
+
user_id
,
{},
{
method
:
'GET'
});
if
(
userGjj
.
status
===
200
&&
!
ctx
.
isEmpty
(
userGjj
.
data
.
ret
))
{
children
.
push
({
id
:
-
3
,
title
:
'最适合您的'
,
quality
:
await
this
.
getSuitLoans
(),
normal
:
common_loans_ids
,
});
}
else
{
children
.
push
({
id
:
-
4
,
title
:
'51公积金贷'
,
quality
:
credit_loans_ids
,
normal
:
[],
});
children
.
push
({
id
:
-
5
,
title
:
'普通贷'
,
quality
:
[],
normal
:
common_loans_ids
,
});
}
}
else
{
children
.
push
({
id
:
-
4
,
title
:
'51公积金贷'
,
quality
:
credit_loans_ids
,
normal
:
[],
});
children
.
push
({
id
:
-
5
,
title
:
'普通贷'
,
quality
:
[],
...
...
@@ -129,7 +139,8 @@ class ProductService extends Service {
// 最适合您的(推荐)贷款
async
getSuitLoans
()
{
const
ret
=
await
this
.
getBusinessRecommendList
(
9999
);
const
results
=
await
this
.
getBusinessRecommendList
(
9999
);
const
ret
=
R
.
pluck
(
'business_id'
,
results
);
return
ret
;
}
...
...
config/config.local.js
View file @
12226915
...
...
@@ -17,6 +17,8 @@ module.exports = appInfo => {
domainWhiteList
:
[],
};
config
.
middleware
=
[
'errorHandler'
,
'deviceLogin'
,
'deviceInit'
,
'responseSet'
];
exports
.
multipart
=
{
// 不用steam用file
mode
:
'file'
,
...
...
@@ -103,13 +105,13 @@ module.exports = appInfo => {
};
config
.
PHP_URL
=
'https://kaifa.jianbing.com'
;
config
.
NODE_URL
=
'https://
dev
-nginx.jianbing.com/user_api/v1'
;
config
.
NODE_BASE_URL
=
'https://
dev
-nginx.jianbing.com'
;
config
.
NODE_URL
=
'https://
uat
-nginx.jianbing.com/user_api/v1'
;
config
.
NODE_BASE_URL
=
'https://
uat
-nginx.jianbing.com'
;
config
.
HOUSE_SERVICE_API
=
'https://uat-nginx.jianbing.com/house-service'
;
config
.
CDN_BASE_URL
=
'https://r.51gjj.com/image/'
;
config
.
USER_CENTER_API_URI
=
'https://
dev
-nginx.jianbing.com/usercenter-service'
;
config
.
USER_CENTER_API_URI
=
'https://
uat
-nginx.jianbing.com/usercenter-service'
;
return
config
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment