Commit b29c5ede by 蒋勇

d

parents a309878b 190f17e2
......@@ -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) {
......
......@@ -86,8 +86,8 @@ module.exports=
console.log("preview");
},
success(response, file, fileList){
var xml= this.loadXML(response);
console.log(response,"xxxxxxxxxxxxxxxxxxxxxxxxxx",xml);
this.result=xml.documentElement.getElementsByTagName("Location")[0].textContent;
this.$emit('uploadsuccess',{result:this.result,file:file,fileList:fileList,key:this.d.key,flag:this.flag,dataSouce:this.dataSouce});
},
......
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