Commit 3ae75610 by 蒋勇

d

parent 00c24516
......@@ -259,6 +259,38 @@ class AccessAuthAPI extends APIBase {
await this.cacheManager["OpenCodeCache"].cache(opencode, ruser, 120);
return system.getResultSuccess({ auth_url: authUrl, opencode: opencode });
}
//wxbind
async wxBindWithoutVCode(pobj, qobj, req) {
var appkey = req.app.appkey;
if (!pobj.mobile) {
return system.getResult(null, "电话号码不能未空.");
}
if (!pobj.openid) {
return system.getResult(null, "openid不能未空.");
}
var param = {
app_id: req.app.id,
mobile: pobj.mobile,
openid:pobj.openid
}
var ruser = await this.userSve.wxBind(param);
if (!ruser) {
param = {
app_id: req.app.id,
userName: pobj.mobile,
nickName:pobj.mobile,
mobile: pobj.mobile,
password: pobj.mobile,
wxopenid:pobj.openid
}
ruser = await this.userSve.register(param);
}
var opencode = super.getUUID();
var authUrl = req.app.authUrl + "?opencode=" + opencode;
await this.cacheManager["OpenCodeCache"].cache(opencode, ruser, 120);
return system.getResultSuccess({ auth_url: authUrl, opencode: opencode });
}
async loginByMobileWithReg(pobj, qobj, req) {
if (!pobj.mobile) {
......
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