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
eaf8cd17
Commit
eaf8cd17
authored
Apr 16, 2021
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lin add getAllService
parent
25859d1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
center-app/app/base/api/impl/auth/accessAuth.js
+7
-2
center-app/app/base/service/impl/utilsSve/utilsappSve.js
+14
-4
No files found.
center-app/app/base/api/impl/auth/accessAuth.js
View file @
eaf8cd17
...
@@ -87,7 +87,7 @@ class AccessAuthAPI extends APIBase {
...
@@ -87,7 +87,7 @@ class AccessAuthAPI extends APIBase {
if
(
!
actionBody
.
vcode
)
{
if
(
!
actionBody
.
vcode
)
{
return
system
.
getResult
(
null
,
"actionBody.vcode can not be empty !"
);
return
system
.
getResult
(
null
,
"actionBody.vcode can not be empty !"
);
}
}
if
(
!
pobj
.
userInfo
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
null
,
"userpin can not be empty !"
);
return
system
.
getResult
(
null
,
"userpin can not be empty !"
);
}
}
var
result
=
await
this
.
opPlatformUtils
.
putUserMobileByVcode
(
pobj
,
actionBody
);
var
result
=
await
this
.
opPlatformUtils
.
putUserMobileByVcode
(
pobj
,
actionBody
);
...
@@ -114,10 +114,14 @@ class AccessAuthAPI extends APIBase {
...
@@ -114,10 +114,14 @@ class AccessAuthAPI extends APIBase {
* 获取所有渠道
* 获取所有渠道
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getAllChannels
()
{
async
getAllChannels
()
{
var
result
=
await
this
.
utilsappSve
.
getAllChannels
();
var
result
=
await
this
.
utilsappSve
.
getAllChannels
();
return
result
;
return
result
;
}
}
async
getAllService
()
{
var
result
=
await
this
.
utilsappSve
.
getAllService
();
return
result
;
}
}
}
module
.
exports
=
AccessAuthAPI
;
module
.
exports
=
AccessAuthAPI
;
\ No newline at end of file
center-app/app/base/service/impl/utilsSve/utilsappSve.js
View file @
eaf8cd17
...
@@ -52,11 +52,11 @@ class UtilsAppSve extends AppServiceBase {
...
@@ -52,11 +52,11 @@ class UtilsAppSve extends AppServiceBase {
async
getAppInfo
(
pobj
)
{
async
getAppInfo
(
pobj
)
{
var
uapp_id
=
pobj
.
uappId
||
""
;
var
uapp_id
=
pobj
.
uappId
||
""
;
var
app
=
await
this
.
appDao
.
findOne
({
app_code
:
uapp_id
});
var
app
=
await
this
.
appDao
.
findOne
({
app_code
:
uapp_id
});
if
(
app
)
{
if
(
app
)
{
return
system
.
getResultSuccess
(
app
);
return
system
.
getResultSuccess
(
app
);
}
}
if
(
!
app
)
{
if
(
!
app
)
{
return
system
.
getResult
(
null
,
"渠道码错误"
)
return
system
.
getResult
(
null
,
"渠道码错误"
)
}
}
}
}
...
@@ -65,10 +65,20 @@ class UtilsAppSve extends AppServiceBase {
...
@@ -65,10 +65,20 @@ class UtilsAppSve extends AppServiceBase {
* 获取所有渠道
* 获取所有渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
*/
async
getAllChannels
(){
async
getAllChannels
()
{
let
sql
=
`SELECT DISTINCT(uapp_id),app_name FROM p_app`
;
let
sql
=
`SELECT DISTINCT(uapp_id),app_name FROM p_app`
;
let
result
=
await
this
.
appDao
.
customQuery
(
sql
);
let
result
=
await
this
.
appDao
.
customQuery
(
sql
);
return
system
.
getResultSuccess
(
result
);
return
system
.
getResultSuccess
(
result
);
}
}
/**
* 获取所有渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
async
getAllService
()
{
let
sql
=
`select uapp_id,app_hosts,app_name,\`desc\` from p_app`
;
let
result
=
await
this
.
appDao
.
customQuery
(
sql
);
return
system
.
getResultSuccess
(
result
);
}
}
}
module
.
exports
=
UtilsAppSve
;
module
.
exports
=
UtilsAppSve
;
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