Commit ee182a7b by 宋毅

tj

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