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
227c2723
Commit
227c2723
authored
Sep 08, 2021
by
杨梦雅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
b0bc92e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
user.service.ts
v2.0/src/service/common/user.service.ts
+4
-4
updateSignGrowTask.ts
v2.0/src/utils/common/update/updateSignGrowTask.ts
+2
-2
No files found.
v2.0/src/service/common/user.service.ts
View file @
227c2723
...
...
@@ -75,8 +75,8 @@ class UserService extends BaseService {
userNick
,
openId
,
remainTimes
:
{
follow
:
isFollow
?
follow
.
value
:
0
,
member
:
vipInfo
.
isVip
?
member
.
value
:
0
,
follow
:
isFollow
?
follow
.
reward
:
0
,
member
:
vipInfo
.
isVip
?
member
.
reward
:
0
,
...
initRemainTimes
(
tasks
)
},
member
:
{
...
...
@@ -151,7 +151,7 @@ class UserService extends BaseService {
if
(
!
followBefore
&&
followNow
&&
!
userInfo
.
follow
.
newFollow
)
{
projection
.
$set
.
follow
=
setNewFollowUserData
(
userInfo
.
follow
)
projection
.
$push
[
`taskInfo.
${
today
}
.follow`
]
=
{
createTime
:
Date
.
now
()
}
follow
?.
value
&&
(
projection
.
$inc
[
`remainTimes.follow`
]
=
follow
.
value
)
follow
?.
reward
&&
(
projection
.
$inc
[
`remainTimes.follow`
]
=
follow
.
reward
)
}
// 之前进入活动非会员,现在进入会员,则视为新会员用户
...
...
@@ -159,7 +159,7 @@ class UserService extends BaseService {
if
(
newVip
)
{
projection
.
$set
.
member
=
setNewVipUserData
(
userInfo
.
member
)
projection
.
$push
[
`taskInfo.
${
today
}
.member`
]
=
{
createTime
:
Date
.
now
()
}
member
?.
value
&&
(
projection
.
$inc
[
`remainTimes.member`
]
=
member
.
value
)
member
?.
reward
&&
(
projection
.
$inc
[
`remainTimes.member`
]
=
member
.
reward
)
}
projection
=
merge
({},
projection
,
updateUserWhenLogin
(
this
.
context
,
activityInfo
,
userInfo
))
...
...
v2.0/src/utils/common/update/updateSignGrowTask.ts
View file @
227c2723
...
...
@@ -9,7 +9,7 @@ export default async function updateSignTask(
):
Promise
<
IPreUpdateQuery
|
undefined
>
{
if
(
!
activityInfo
?.
tasks
?.
sign
)
return
// 获取签到奖励
const
{
value
}
=
activityInfo
?.
tasks
?.
sign
||
{}
const
{
reward
}
=
activityInfo
?.
tasks
?.
sign
||
{}
const
{
todayCompleteTimes
}
=
getTodayCompleteGrowTask
(
'sign'
,
task
)
...
...
@@ -18,7 +18,7 @@ export default async function updateSignTask(
return
result
===
1
?
{
$inc
:
{
'remainTimes.sign'
:
value
||
0
'remainTimes.sign'
:
+
reward
||
0
}
}
:
{}
...
...
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