Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
c8be87bc
Commit
c8be87bc
authored
Jan 09, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
94f6e74c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
11 deletions
+29
-11
igirl-channel/app/base/api/impl/auth/accessAuth.js
+11
-5
igirl-channel/app/base/db/cache/appUserPinByLoginPwdCache.js
+2
-2
igirl-channel/app/base/system.js
+6
-0
igirl-channel/app/front/entry/public/apidoc/user/user.md
+10
-4
No files found.
igirl-channel/app/base/api/impl/auth/accessAuth.js
View file @
c8be87bc
...
...
@@ -4,6 +4,7 @@ class AccessAuthAPI extends APIBase {
constructor
()
{
super
();
this
.
opPlatformUtils
=
system
.
getObject
(
"util.businessManager.opPlatformUtils"
);
this
.
toolSve
=
system
.
getObject
(
"service.trademark.toolSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -40,6 +41,11 @@ class AccessAuthAPI extends APIBase {
var
opResult
=
system
.
getResult
(
null
,
"req Failure"
);
var
userpin
=
this
.
getUUID
();
action_body
.
appInfo
=
req
.
app
;
var
opStr
=
action_body
.
userName
||
action_body
.
mobile
;
var
encryptStrResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
opStr
);
if
(
encryptStrResult
.
status
==
0
){
encryptStrResult
.
data
=
encodeURIComponent
(
encryptStrResult
.
data
);
}
switch
(
action_type
)
{
// sy
case
"test"
:
//测试
...
...
@@ -52,27 +58,27 @@ class AccessAuthAPI extends APIBase {
}
break
;
case
"loginUserByChannelUserId"
:
//????
opResult
=
await
this
.
opPlatformUtils
.
loginUserByChannelUserId
(
action_body
,
action_process
,
userpin
,
req
);
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByChannelUserId
(
action_body
,
userpin
);
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
actionBody
.
channelUserId
})
}
break
;
case
"userPinByLgoin"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoin
(
action_body
,
userpin
);
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
}
break
;
case
"userPinByLgoinVcode"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"login"
);
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
}
break
;
case
"userPinByRegister"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"reg"
);
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
}
break
;
default
:
...
...
igirl-channel/app/base/db/cache/appUserPinByLoginPwdCache.js
View file @
c8be87bc
...
...
@@ -25,10 +25,10 @@ class AppUserPinByLoginPwdCache extends CacheBase {
}
//值为2010为用户名或密码错误
var
userInfo
=
await
this
.
appuserDao
.
getItemByUUserId
(
actionBody
.
userName
,
actionBody
.
appInfo
.
id
);
if
(
!
userInfo
)
{
return
system
.
getResult
(
nul
l
,
"user to item is empty !"
);
return
system
.
getResult
Fail
(
system
.
noUserFai
l
,
"user to item is empty !"
);
}
if
(
userInfo
.
isEnabled
!=
1
)
{
return
system
.
getResult
(
null
,
"user to item is Disable !"
);
return
system
.
getResult
Fail
(
system
.
userDisable
,
"user to item is Disable !"
);
}
return
system
.
getResultSuccess
(
userInfo
);
}
...
...
igirl-channel/app/base/system.js
View file @
c8be87bc
...
...
@@ -319,4 +319,9 @@ System.getAppInfoFail = 1130;
//已经存在信息
System
.
existData
=
1400
;
//获取访问token失败
System
.
noUserFail
=
2070
;
//获取访问token失败
System
.
userDisable
=
2080
;
module
.
exports
=
System
;
\ No newline at end of file
igirl-channel/app/front/entry/public/apidoc/user/user.md
View file @
c8be87bc
...
...
@@ -48,10 +48,12 @@
#### 返回结果
```
javascript
{
"status"
:
0
,
// 0为成功,2010为账户或密码错误,2060为重复登录,否则失败
"status"
:
0
,
// 0为成功,2010为账户或密码错误,2060为重复登录,
2070为帐号不存在,2080为帐号禁用,
否则失败
"msg"
:
"success"
,
"data"
:
{
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
,
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"channelUserId"
:
""
,
"userName"
:
""
},
"requestId"
:
"1b12b0e9c190436da000386ddf693c8f"
}
...
...
@@ -79,7 +81,9 @@
"status"
:
0
,
// 0为成功,2030为验证码错误,2060为重复登录,否则失败
"msg"
:
"success"
,
"data"
:
{
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
,
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"channelUserId"
:
""
,
"userName"
:
""
},
"requestId"
:
"1b12b0e9c190436da000386ddf693c8f"
}
...
...
@@ -108,7 +112,9 @@
"status"
:
0
,
// 0为成功,2030为验证码错误,2060为重复登录,否则失败
"msg"
:
"success"
,
"data"
:
{
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"userpin"
:
"230ecdf3333944ff834f56fba10a02aa"
,
//用户登录后的凭证,增、删、改、查、涉及用户的需要传递此值在请求头中
"channelUserId"
:
""
,
"userName"
:
""
},
"requestId"
:
"1b12b0e9c190436da000386ddf693c8f"
}
...
...
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