Commit eeb56fab by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents 79a2f070 8be567a5
......@@ -112,9 +112,12 @@ class AccessAuthAPI extends WEBBase {
case "logout"://用户退出--已经废弃,前端自己进行移除userpin信息
opResult = await this.utilsAuthSve.userLogout(pobj, pobj.actionBody);
break;
case "getAllChannels":
case "getAllChannels"://获取所有渠道(去重appid、app名字)
opResult = await this.utilsAuthSve.getAllChannels(pobj);
break;
case "getAllService"://获取所有渠道(信息更全一些)
opResult = await this.utilsAuthSve.getAllService(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -270,17 +270,17 @@ class UtilsAuthService extends AppServiceBase {
//360验证接口
let subData = "pin=" + pin + "&token=" + token;
let url = settings.requestUrl360() + 'api/v1/VerifyPin';
let rtn = await this.restClient.execGet(subData,url);
let rtn = await this.restClient.execGet(subData, url);
if (!rtn || !rtn.stdout) {
return system.getResult(null, "restGet data is empty");
}
let checkRet = JSON.parse(rtn.stdout);
if(checkRet.code != 200){
return system.getResultFail(-1,checkRet.msg)
if (checkRet.code != 200) {
return system.getResultFail(-1, checkRet.msg)
}
//---渠道用户登录,有则返回userpin ,没有则注册用户并返回userpin
actionBody.channelUserId = pin;
opResult = await this.getLoginByUserName(req,pobj, actionBody);
opResult = await this.getLoginByUserName(req, pobj, actionBody);
return opResult;
}
......@@ -294,12 +294,22 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 获取所有渠道
* 获取所有渠道(去重appid、app名字)
* @returns {Promise<void>}
*/
async getAllChannels(pobj){
let url= this.centerAppUrl + 'auth/accessAuth/getAllChannels';
let result = await this.restPostUrl(pobj,url);
async getAllChannels(pobj) {
let url = this.centerAppUrl + 'auth/accessAuth/getAllChannels';
let result = await this.restPostUrl(pobj, url);
return result
}
/**
* 获取所有渠道(信息更全一些)
* @returns {Promise<void>}
*/
async getAllService(pobj) {
let url = this.centerAppUrl + 'auth/accessAuth/getAllService';
let result = await this.restPostUrl(pobj, url);
return result
}
......
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