Commit 4ed7d4b8 by 任晓松

update

parent d287c972
......@@ -32,7 +32,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 渠道通过账户进行登录,有则返回用户信息,没有则创建用户
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {channelUserId:XX}
*/
async getLoginByUserName(pobj, actionBody) {//渠道通过账户进行登录,有则返回用户信息,没有则创建用户---actionBody.channelUserId
......@@ -50,7 +50,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 通过账户和密码登录
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userName:XX,password:XXX}
*/
async getReqUserPinByLgoin(pobj, actionBody) {
......@@ -70,7 +70,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 通过短信登录或注册信息
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XXX,vcode:XXX,reqType:"reg",password:XXX-reqType为reg时有此值}
*/
async getReqUserPinByLgoinVcode(pobj, actionBody) {
......@@ -96,7 +96,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 获取默认模板的手机验证码
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XXX}
*/
async getVerifyCodeByMoblie(pobj, actionBody) {
......@@ -108,7 +108,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 通过手机验证码修改用户密码
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XX,vcode:XXX,newPwd:XXX,userpin:XXXXX}
*/
async putUserPwdByMobile(pobj, actionBody) {
......@@ -132,7 +132,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 通过userpin获取用户登录信息
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userpin:XXXXX}
*/
async getLoginInfo(pobj, actionBody) {
......@@ -147,7 +147,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 用户退出
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userpin:XXXX}
*/
async userLogout(pobj, actionBody) {
......@@ -172,20 +172,21 @@ class UtilsAuthService extends AppServiceBase {
let result = await this.get360Token();
let token = result.access_token;
//360验证接口
let subData = "pin=" + pin + "&token=" + token
let rtn = await this.restClient.execGet(subData,settings.requestUrl360());
let subData = "pin=" + pin + "&token=" + token;
let url = settings.requestUrl360() + 'api/v1/VerifyPin';
let rtn = await this.restClient.execGet(subData,url);
if (!rtn || !rtn.stdout) {
return system.getResult(null, "restPost data is empty");
return system.getResult(null, "restGet data is empty");
}
let checkRet = JSON.parse(rtn.stdout);
console.log(checkRet,'checkRet--------------')
console.log(checkRet,'checkRet--------------');
//---渠道用户登录,有则返回userpin ,没有则注册用户并返回userpin
actionBody.channelUserId = pin;
let loginRt = await this.getLoginByUserName(pobj,actionBody);
if (loginRt.status != 0 && loginRt.status != 2060) {
return loginRt;
}
opResult.data={ userpin: pobj.actionBody.userpin }
opResult.data={ userpin : pobj.actionBody.userpin }
if (loginRt.status == 2060) {
opResult.msg = loginRt.msg;
opResult.data.userpin = loginRt.data.userpin;
......
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