Commit 4a27b106 by 蒋勇

Merge branch 'center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into center-manage

parents e433d79a b60ff376
...@@ -22,7 +22,7 @@ class ChannelService extends ServiceBase { ...@@ -22,7 +22,7 @@ class ChannelService extends ServiceBase {
if( !this.handlers[fileName][method]){ if( !this.handlers[fileName][method]){
throw Error(`请在${fileName}文件中定义渠道流量的处理方法${method}`) throw Error(`请在${fileName}文件中定义渠道流量的处理方法${method}`)
} }
let rtn=await this.handlers[fileName][method](datajson) let rtn=await this.handlers[fileName][method](datajson);
return rtn; return rtn;
} }
async create(p,q,req){ async create(p,q,req){
......
...@@ -41,8 +41,7 @@ class TxHandler { ...@@ -41,8 +41,7 @@ class TxHandler {
} }
var rtn = await rc.execPost3(params, requrl); var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
console.log("RRRRRRRRRRRRRRR"); console.log(JSON.stringify(j),"RRRRRRRRRRRRRRR");
console.log(JSON.stringify(j));
return j; return j;
} }
catch(error){ catch(error){
...@@ -250,10 +249,13 @@ class TxHandler { ...@@ -250,10 +249,13 @@ class TxHandler {
module.exports = new TxHandler(); module.exports = new TxHandler();
var task = new TxHandler(); // (async ()=>{
var ConsultTypeName = "/工商服务/公司注册/".split("/")[2]; // var task = new TxHandler();
console.log(ConsultTypeName); // var ConsultTypeName = "/工商服务/公司注册/".split("/")[2];
var d = task.userService.getBizUserForBizChance('18738988150','公司宝',ConsultTypeName,'北京'); // console.log(ConsultTypeName);
console.log("ddddddddddddd"); // var d = await task.userService.getBizUserForBizChance("1880156771","公司宝","公司注册","北京");
console.log(JSON.stringify(d)); // console.log("ddddddddddddd");
console.log("dddddddddddddd"); // console.log(JSON.stringify(d));
// console.log("dddddddddddddd");
// })()
...@@ -10,14 +10,14 @@ module.exports = function (app) { ...@@ -10,14 +10,14 @@ module.exports = function (app) {
}else{ }else{
let rtn=await chnelapi.channelHandle(channel,req.path+"/"+ req.body.actionType,req.body) let rtn=await chnelapi.channelHandle(channel,req.path+"/"+ req.body.actionType,req.body)
if(rtn!=null){ if(rtn!=null){
res.end(JSON.stringify({status:0,msg:"ok"})); res.end(JSON.stringify(rtn));
}else{ }else{
res.end(JSON.stringify({status:-1,msg:"fail"})); res.end(JSON.stringify({status:-1,message:"fail"}));
} }
} }
}catch(e){ }catch(e){
console.log(e) console.log(e)
res.end(JSON.stringify({status:-1,msg:"fail"})); res.end(JSON.stringify({status:-1,message:e}));
} }
}) })
app.get('/api/:gname/:qname/:method', function (req, res) { app.get('/api/:gname/:qname/:method', function (req, res) {
......
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