Commit ee182a7b by 宋毅

tj

parent 31b7d05b
...@@ -30,26 +30,26 @@ class APIBase extends DocBase { ...@@ -30,26 +30,26 @@ class APIBase extends DocBase {
async doexec(gname, methodname, pobj, query, req) { async doexec(gname, methodname, pobj, query, req) {
try { try {
//检查访问token //检查访问token
var isPassResult = await this.checkAcck(gname, methodname, pobj, query, req); // var isPassResult = await this.checkAcck(gname, methodname, pobj, query, req);
if (!isPassResult.ispass) { // if (!isPassResult.ispass) {
return system.getResultFail(system.tokenFail, "访问token失效,请重新获取"); // return system.getResultFail(system.tokenFail, "访问token失效,请重新获取");
} // }
var rtn = await this[methodname](pobj, query); var rtn = await this[methodname](pobj, query);
if(isPassResult.apptocheck){ // if(isPassResult.apptocheck){
var app=isPassResult.apptocheck.app; // var app=isPassResult.apptocheck.app;
if(methodname && methodname.indexOf("recvNotificationForCacheCount")<0){ // if(methodname && methodname.indexOf("recvNotificationForCacheCount")<0){
this.apitradeSvr.create({ // this.apitradeSvr.create({
srcappkey: app.appkey, // srcappkey: app.appkey,
tradeType: "consume", // tradeType: "consume",
op: req.classname + "/" + methodname, // op: req.classname + "/" + methodname,
params: JSON.stringify(pobj), // params: JSON.stringify(pobj),
clientIp: req.clientIp, // clientIp: req.clientIp,
agent: req.uagent, // agent: req.uagent,
destappkey:settings.appKey, // destappkey:settings.appKey,
}); // });
} // }
} // }
return rtn; return rtn;
} catch (e) { } catch (e) {
console.log(e.stack,"api调用出现异常,请联系管理员..........") console.log(e.stack,"api调用出现异常,请联系管理员..........")
......
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