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
41883d3c
Commit
41883d3c
authored
Sep 27, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
自己不能给自己助力
parent
12a74255
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
constants.ts
v2.0/src/constants.ts
+4
-0
share.controller.ts
v2.0/src/controller/share.controller.ts
+2
-0
No files found.
v2.0/src/constants.ts
View file @
41883d3c
...
...
@@ -64,6 +64,10 @@ export const BusinessError = {
code
:
`430007`
,
defaultMsg
:
`已经成功邀请过`
},
ERROR_NO_INVITE_SELF
:
{
code
:
`430008`
,
defaultMsg
:
`自己不能给自己助力`
},
ERROR_FORBIDDEN_OPE
:
{
code
:
`530001`
,
defaultMsg
:
`非法操作`
...
...
v2.0/src/controller/share.controller.ts
View file @
41883d3c
...
...
@@ -23,6 +23,8 @@ export default class Share {
const
{
inviteId
}
=
context
.
data
const
{
openId
}
=
context
if
(
openId
===
inviteId
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_INVITE_SELF
)
const
inviteUserInfo
:
IUserInfo
=
await
userService
.
getUserInfoByOpenId
(
inviteId
)
// inviteId的用户信息查询不到, 则inviteId无效
if
(
!
inviteUserInfo
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_INVALID_INVITE_ID
)
...
...
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