Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
0943e0a6
Commit
0943e0a6
authored
Nov 17, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
bug
parent
98efd01e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
user.service.ts
v2.0/src/service/common/user.service.ts
+4
-2
No files found.
v2.0/src/service/common/user.service.ts
View file @
0943e0a6
...
...
@@ -10,6 +10,8 @@ import { USER_DB_NAME } from '../../db'
import
{
getToday
,
formatUpdateUserProjection
}
from
'../../utils'
import
{
isNewVip
}
from
'../../utils/common/userUpdate'
import
{
formatUserNick
,
formatUpdatedDataByProjection
}
from
'../../utils/common/format'
import
{
setNewFollowUserData
,
setNewVipUserData
}
from
'../../utils/common/userUpdate'
import
{
getShopVip
,
formatVipCbUrl
}
from
'../../utils/common/vip'
import
{
get
}
from
'mpath'
...
...
@@ -145,7 +147,7 @@ class UserService extends BaseService {
const
followNow
=
isFollow
if
(
!
followBefore
&&
followNow
&&
!
userInfo
.
follow
.
newFollow
)
{
// @ts-ignore
projection
.
$set
.
follow
=
this
.
setNewFollowUserData
(
userInfo
.
follow
)
projection
.
$set
.
follow
=
setNewFollowUserData
(
userInfo
.
follow
)
projection
.
$push
[
`taskInfo.
${
today
}
.follow`
]
=
{
createTime
:
Date
.
now
()
}
projection
.
$inc
[
`remainTimes.follow`
]
=
follow
.
value
}
...
...
@@ -154,7 +156,7 @@ class UserService extends BaseService {
const
newVip
=
isNewVip
(
userInfo
,
vipInfo
)
if
(
newVip
)
{
// @ts-ignore
projection
.
$set
.
member
=
this
.
setNewVipUserData
(
userInfo
.
member
)
projection
.
$set
.
member
=
setNewVipUserData
(
userInfo
.
member
)
projection
.
$push
[
`taskInfo.
${
today
}
.member`
]
=
{
createTime
:
Date
.
now
()
}
projection
.
$inc
[
`remainTimes.member`
]
=
member
.
value
}
...
...
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