Commit 89871ef4 by 刘泽奇

Merge branch 'igirl-channel-web' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel-web

parents c255ed62 4e462211
......@@ -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调用出现异常,请联系管理员..........")
......
......@@ -6,7 +6,7 @@ var moment = require("moment");
class OplogCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(OplogCtl));
//this.appS=system.getObject("service.appSve");
this.oplogSve=system.getObject("service.common.oplogSve");
}
async initNewInstance(qobj) {
......@@ -17,23 +17,23 @@ class OplogCtl extends CtlBase {
}
async debug(obj) {
obj.logLevel = "debug";
return this.create(obj);
return this.oplogSve.create(obj);
}
async info(obj) {
obj.logLevel = "info";
return this.create(obj);
return this.oplogSve.create(obj);
}
async warn(obj) {
obj.logLevel = "warn";
return this.create(obj);
return this.oplogSve.create(obj);
}
async error(obj) {
obj.logLevel = "error";
return this.create(obj);
return this.oplogSve.create(obj);
}
async fatal(obj) {
obj.logLevel = "fatal";
return this.create(obj);
return this.oplogSve.create(obj);
}
/*
......
......@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec);
const uuidv4 = require('uuid/v4');
class ExecClient {
constructor() {
this.cmdPostPattern = "curl -k -H 'Content-type: application/json' -d '{data}' {url}";
this.cmdPostPattern = "curl --user admines:adminGSBes. -k -H 'Content-type: application/json' -d '{data}' {url}";
this.cmdGetPattern = "curl -G -X GET '{url}'";
this.cmdPostTK = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}";
}
......
......@@ -2,7 +2,28 @@
var System = require("../../base/system");
var metaCtl = System.getObject("web.common.metaCtl");
var tmqueryCtl = System.getObject("web.trademark.tmqueryCtl");
var oplogCtl = System.getObject("web.common.oplogCtl");
module.exports = function (app) {
app.get("/jd/orderNotify", async function (req, res) {
oplogCtl.info({
optitle: "########################################################.................orderNotify",
op: "/jd/orderNotify",
content: "req.query=" + JSON.stringify(req.query) + ",req.body=" + JSON.stringify(req.body),
clientIp: ""
});
var params =
{
instanceId: req.query.orderBizId,
appInfo: {
authUrl: "http://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=http://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9841572588670903"
}
};
res.end(JSON.stringify(params));
return;
console.log(req.query, "req.query.....########################################################.................orderNotify");
console.log(req.body, "req.body......########################################################................orderNotify");
});
app.get("/1688/selfRegister", async function (req, res) {
var params = {
actionProcess: "1688",
......
......@@ -30,7 +30,7 @@ var settings = {
if (this.env == "dev") {
return "http://p.apps.com:4001/";
} else {
return "http://open.gongsibao.com/";
return "https://open.gongsibao.com/";
}
},
teleDomain: function () {
......
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