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
91628a1a
Commit
91628a1a
authored
Feb 13, 2020
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addd
parent
6644965e
Pipeline
#19328
passed with stage
in 30 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
check.js
app/controller/duxiaoman/check.js
+2
-3
check.js
app/service/duxiaoman/check.js
+5
-2
No files found.
app/controller/duxiaoman/check.js
View file @
91628a1a
...
@@ -18,9 +18,8 @@ class CheckController extends Controller {
...
@@ -18,9 +18,8 @@ class CheckController extends Controller {
async
getCheck
()
{
async
getCheck
()
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
let
params
=
ctx
.
request
.
query
;
let
params
=
ctx
.
request
.
query
;
ctx
.
logger
.
info
(
'params:-----'
+
JSON
.
stringify
(
params
));
ctx
.
logger
.
info
(
'params:'
+
JSON
.
stringify
(
params
));
let
businessId
=
params
[
'business_id'
]
?
Number
(
params
[
'business_id'
])
:
142
;
const
ret
=
await
ctx
.
service
.
duxiaoman
.
check
.
check
(
params
);
const
ret
=
await
ctx
.
service
.
duxiaoman
.
check
.
check
(
businessId
);
ctx
.
success
(
ret
);
ctx
.
success
(
ret
);
}
}
...
...
app/service/duxiaoman/check.js
View file @
91628a1a
...
@@ -75,7 +75,7 @@ class CheckService extends Service {
...
@@ -75,7 +75,7 @@ class CheckService extends Service {
return
sign
;
return
sign
;
}
}
async
check
(
bid
)
{
async
check
(
inputParams
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
let
ret
=
{
let
ret
=
{
is_target_user
:
0
,
//1 true 0 false -1 NOT_FOUND
is_target_user
:
0
,
//1 true 0 false -1 NOT_FOUND
...
@@ -97,11 +97,13 @@ class CheckService extends Service {
...
@@ -97,11 +97,13 @@ class CheckService extends Service {
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
ctx
.
failed
(
'没有找到对应的手机号'
);
ctx
.
failed
(
'没有找到对应的手机号'
);
}
}
let
fr
=
this
.
config
.
CFG_ENV
===
'pro'
?
(
inputParams
.
fr
?
inputParams
.
fr
:
'jmall_list54'
)
:
'gjj_test'
;
let
params
=
{
let
params
=
{
app_id
:
this
.
config
.
DXM_APP_ID
,
app_id
:
this
.
config
.
DXM_APP_ID
,
datetime
:
new
Date
().
getTime
(),
datetime
:
new
Date
().
getTime
(),
phone_md5
:
ctx
.
helper
.
md5
(
userInfo
.
passport
),
phone_md5
:
ctx
.
helper
.
md5
(
userInfo
.
passport
),
fr
:
this
.
config
.
DXM_FR
,
fr
:
fr
,
sign
:
''
,
sign
:
''
,
}
}
params
.
sign
=
await
this
.
sign
(
params
);
params
.
sign
=
await
this
.
sign
(
params
);
...
@@ -135,6 +137,7 @@ class CheckService extends Service {
...
@@ -135,6 +137,7 @@ class CheckService extends Service {
if
(
ret
.
is_target_user
===
1
)
{
if
(
ret
.
is_target_user
===
1
)
{
//pro环境 142对应193 143对应194
//pro环境 142对应193 143对应194
//uat环境 174对应175 176对应177
//uat环境 174对应175 176对应177
let
bid
=
inputParams
[
'business_id'
]
?
Number
(
inputParams
[
'business_id'
])
:
142
;
let
businessId
=
this
.
config
.
CFG_ENV
===
'pro'
?
(
bid
===
142
?
193
:
194
)
:
(
this
.
config
.
CFG_ENV
===
'uat'
?
(
bid
===
174
?
175
:
177
)
:
1
);
let
businessId
=
this
.
config
.
CFG_ENV
===
'pro'
?
(
bid
===
142
?
193
:
194
)
:
(
this
.
config
.
CFG_ENV
===
'uat'
?
(
bid
===
174
?
175
:
177
)
:
1
);
let
businessInfo
=
await
this
.
getBusinessInfo
(
businessId
);
let
businessInfo
=
await
this
.
getBusinessInfo
(
businessId
);
ret
.
url
=
businessInfo
.
url
;
ret
.
url
=
businessInfo
.
url
;
...
...
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