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 { ...@@ -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调用出现异常,请联系管理员..........")
......
...@@ -6,7 +6,7 @@ var moment = require("moment"); ...@@ -6,7 +6,7 @@ var moment = require("moment");
class OplogCtl extends CtlBase { class OplogCtl extends CtlBase {
constructor() { constructor() {
super("common", CtlBase.getServiceName(OplogCtl)); super("common", CtlBase.getServiceName(OplogCtl));
//this.appS=system.getObject("service.appSve"); this.oplogSve=system.getObject("service.common.oplogSve");
} }
async initNewInstance(qobj) { async initNewInstance(qobj) {
...@@ -17,23 +17,23 @@ class OplogCtl extends CtlBase { ...@@ -17,23 +17,23 @@ class OplogCtl extends CtlBase {
} }
async debug(obj) { async debug(obj) {
obj.logLevel = "debug"; obj.logLevel = "debug";
return this.create(obj); return this.oplogSve.create(obj);
} }
async info(obj) { async info(obj) {
obj.logLevel = "info"; obj.logLevel = "info";
return this.create(obj); return this.oplogSve.create(obj);
} }
async warn(obj) { async warn(obj) {
obj.logLevel = "warn"; obj.logLevel = "warn";
return this.create(obj); return this.oplogSve.create(obj);
} }
async error(obj) { async error(obj) {
obj.logLevel = "error"; obj.logLevel = "error";
return this.create(obj); return this.oplogSve.create(obj);
} }
async fatal(obj) { async fatal(obj) {
obj.logLevel = "fatal"; obj.logLevel = "fatal";
return this.create(obj); return this.oplogSve.create(obj);
} }
/* /*
......
...@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec); ...@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec);
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid/v4');
class ExecClient { class ExecClient {
constructor() { 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.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}"; this.cmdPostTK = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}";
} }
......
...@@ -2,7 +2,28 @@ ...@@ -2,7 +2,28 @@
var System = require("../../base/system"); var System = require("../../base/system");
var metaCtl = System.getObject("web.common.metaCtl"); var metaCtl = System.getObject("web.common.metaCtl");
var tmqueryCtl = System.getObject("web.trademark.tmqueryCtl"); var tmqueryCtl = System.getObject("web.trademark.tmqueryCtl");
var oplogCtl = System.getObject("web.common.oplogCtl");
module.exports = function (app) { 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) { app.get("/1688/selfRegister", async function (req, res) {
var params = { var params = {
actionProcess: "1688", actionProcess: "1688",
......
...@@ -30,7 +30,7 @@ var settings = { ...@@ -30,7 +30,7 @@ var settings = {
if (this.env == "dev") { if (this.env == "dev") {
return "http://p.apps.com:4001/"; return "http://p.apps.com:4001/";
} else { } else {
return "http://open.gongsibao.com/"; return "https://open.gongsibao.com/";
} }
}, },
teleDomain: function () { 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