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
547d357e
Commit
547d357e
authored
Dec 05, 2019
by
方斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
z
parent
ae709e6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
7 deletions
+39
-7
product.js
app/service/gjj/product.js
+39
-7
No files found.
app/service/gjj/product.js
View file @
547d357e
...
@@ -430,8 +430,9 @@ class ProductService extends Service {
...
@@ -430,8 +430,9 @@ class ProductService extends Service {
for
(
const
v
of
loanList
)
{
for
(
const
v
of
loanList
)
{
//以下代码是为了处理渠道包下不展示特殊的4个业务
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
//start
let
sepecial_business_ids
=
[
95
,
7
,
130
,
51
];
let
sepecial_business_ids
=
[
95
,
7
,
130
,
51
,
99
,
111
];
if
(
place_cid
>
0
&&
place_cid
==
2420
&&
sepecial_business_ids
.
includes
(
v
.
business_id
))
{
let
place_cids
=
[
1210
,
1211
,
5492
,
5719
,
2420
]
if
(
place_cid
>
0
&&
place_cids
.
includes
(
place_cids
)
&&
sepecial_business_ids
.
includes
(
v
.
business_id
))
{
continue
;
continue
;
}
}
//end
//end
...
@@ -480,6 +481,27 @@ class ProductService extends Service {
...
@@ -480,6 +481,27 @@ class ProductService extends Service {
let
location
=
'loan_channel'
;
let
location
=
'loan_channel'
;
let
city
=
''
;
let
city
=
''
;
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
const
{
ctx
}
=
this
;
const
user_sid
=
ctx
.
oldUserId
;
let
filter
=
{
where
:
{
sid
:
user_sid
}
};
let
userInfo
=
await
ctx
.
gjjModel
.
SysUser
.
one
(
filter
);
ctx
.
logger
.
info
(
'get_phone_by_user_sid:'
+
JSON
.
stringify
(
userInfo
));
let
place_cid
=
0
;
if
(
userInfo
!==
null
)
{
place_cid
=
userInfo
.
place_cid
;
}
else
{
const
jianbing_guest_customer_id
=
ctx
.
cookies
.
get
(
'jianbing_guest_customer_id'
,
{
signed
:
false
});
filter
=
{
where
:
{
sid
:
jianbing_guest_customer_id
}
};
let
userInfo
=
await
ctx
.
gjjModel
.
SysGuest
.
one
(
filter
);
if
(
userInfo
!==
null
)
{
place_cid
=
userInfo
.
place_cid
;
}
}
//end
if
(
type
==
4
)
{
if
(
type
==
4
)
{
let
city_res
=
await
ctx
.
helper
.
parseIp
();
let
city_res
=
await
ctx
.
helper
.
parseIp
();
if
(
city_res
&&
city_res
.
content
&&
city_res
.
content
.
address_detail
&&
city_res
.
content
.
address_detail
.
city
)
{
if
(
city_res
&&
city_res
.
content
&&
city_res
.
content
.
address_detail
&&
city_res
.
content
.
address_detail
.
city
)
{
...
@@ -491,7 +513,17 @@ class ProductService extends Service {
...
@@ -491,7 +513,17 @@ class ProductService extends Service {
}
}
for
(
const
v
of
products
)
{
for
(
const
v
of
products
)
{
ctx
.
logger
.
info
(
'imh------begin----------'
)
//ctx.logger.info('imh------begin----------')
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
let
sepecial_business_ids
=
[
95
,
7
,
130
,
51
,
99
,
111
];
let
place_cids
=
[
1210
,
1211
,
5492
,
5719
,
2420
]
if
(
place_cid
>
0
&&
place_cids
.
includes
(
place_cids
)
&&
sepecial_business_ids
.
includes
(
v
.
business_id
))
{
continue
;
}
//end
if
(
Number
(
v
.
type
)
===
2
||
Number
(
v
.
type
)
===
3
)
{
if
(
Number
(
v
.
type
)
===
2
||
Number
(
v
.
type
)
===
3
)
{
v
.
rate
=
''
;
v
.
rate
=
''
;
v
.
rate_title
=
''
;
v
.
rate_title
=
''
;
...
@@ -506,12 +538,12 @@ class ProductService extends Service {
...
@@ -506,12 +538,12 @@ class ProductService extends Service {
url
=
url
.
includes
(
'?'
)
?
url
+
'&from=51gjj_loan_channel'
:
url
+
'?from=51gjj_loan_channel'
;
url
=
url
.
includes
(
'?'
)
?
url
+
'&from=51gjj_loan_channel'
:
url
+
'?from=51gjj_loan_channel'
;
}
}
url
=
this
.
config
.
PHP_URL
+
'/app/track/url?url='
+
encodeURI
(
url
)
+
'&source=51gjj&location='
+
location
;
url
=
this
.
config
.
PHP_URL
+
'/app/track/url?url='
+
encodeURI
(
url
)
+
'&source=51gjj&location='
+
location
;
ctx
.
logger
.
info
(
v
.
cities
)
//
ctx.logger.info(v.cities)
ctx
.
logger
.
info
(
city
)
//
ctx.logger.info(city)
if
(
v
.
cities
&&
v
.
cities
.
length
>
0
&&
city
!=
''
)
{
if
(
v
.
cities
&&
v
.
cities
.
length
>
0
&&
city
!=
''
)
{
ctx
.
logger
.
info
(
'imh------222----------'
)
//
ctx.logger.info('imh------222----------')
if
(
v
.
cities
.
includes
(
city
))
{
if
(
v
.
cities
.
includes
(
city
))
{
ctx
.
logger
.
info
(
'imh----------------'
)
//
ctx.logger.info('imh----------------')
const
tmp
=
{
const
tmp
=
{
type
:
v
.
type
,
type
:
v
.
type
,
business_id
:
v
.
business_id
,
business_id
:
v
.
business_id
,
...
...
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