Commit 0943e0a6 authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 98efd01e
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment