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
c6882b2f
Commit
c6882b2f
authored
Feb 11, 2020
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adddd
parent
5dcbbc34
Pipeline
#19291
passed with stage
in 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
check.js
app/service/duxiaoman/check.js
+15
-1
No files found.
app/service/duxiaoman/check.js
View file @
c6882b2f
...
...
@@ -12,7 +12,8 @@ class CheckService extends Service {
async
getUserHidePhone
()
{
const
{
ctx
}
=
this
;
let
ret
=
{
hidePhone
:
''
hidePhone
:
''
,
is_reject
:
false
,
//30天之内是否有被拒记录
};
if
(
!
ctx
.
oldUserId
||
!
ctx
.
userId
)
{
//如果没有登录就不做处理
...
...
@@ -31,6 +32,19 @@ class CheckService extends Service {
ctx
.
failed
(
'没有找到对应的手机号'
);
}
ret
.
hidePhone
=
userInfo
.
passport
.
replace
(
/
(\d{3})\d{4}(\d{4})
/
,
'$1****$2'
);
//最近30天是否有被拒记录
let
rejectFilter
=
{
attributes
:
[
'user_sid'
],
where
:
{
user_sid
:
userSid
,
created_at
:
{
$gt
:
moment
().
subtract
(
30
,
'days'
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
is_target_user
:
{
$ne
:
1
}
}
}
let
rejectRecord
=
await
ctx
.
prometheusModel
.
DuxiaomanLog
.
findOne
(
rejectFilter
);
ret
.
is_reject
=
!
rejectRecord
?
false
:
true
;
return
ret
;
}
...
...
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