Commit b60ff376 by 王勇飞

gyq

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