Commit 4e2ab126 by 任晓松

Merge remote-tracking branch 'origin/center-channel' into center-channel

parents b8478bdb 72b3cd8b
......@@ -648,6 +648,13 @@ class CenterorderService extends AppServiceBase {
pobj.actionBody.regType = "baidu.radiotv";
}
if(pobj && pobj.appInfo && pobj.appInfo.uapp_id && pobj.appInfo.uapp_id=='52'){
if (pobj.actionBody.channelItemCode == '5') {
pobj.actionBody.regType = "ename.icp";
} else if (pobj.actionBody.channelItemCode == '7') {
pobj.actionBody.regType = "ename.edi";
}
}
var fqobj = {
actionBody: {
area: pobj.actionBody.province,
......
......@@ -115,7 +115,7 @@ class SignService{
}
module.exports = SignService;
// var task = new SignService();
var task = new SignService();
// var obj = {
// "actionType": "serviceProviderSubmitMaterial",
// "actionBody": {
......@@ -176,6 +176,18 @@ module.exports = SignService;
// }
// }
// task.createSign(obj,"7cbb892450174167b5c7e01we4717z51").then(d=>{
// var obj={
// "bizId": "yiming_solution_test_0001",
// "isDirectBuy": 0,
// "orderNo": "yiming_order_test_0001",
// "phone": "18506015665",
// "userName": "张三",
// "companyName": "测试有限公司2",
// "description": "测试11111111",
// "area": "1",
// "price": "1100",
// "consultType": "5"
// };
// task.createSign(obj,"5cdd926122894160o1q1e34us4738v76").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
\ No newline at end of file
......@@ -1433,6 +1433,16 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = "baidu.radiotv";
pobj.actionBody.idempotentSource = "baidu_radiotv";
}
if(pobj.appInfo && pobj.appInfo.uapp_id && pobj.appInfo.uapp_id=="52"){
if (pobj.actionBody.channel_type_code == 5) {
pobj.actionBody.type = "ename.icp";
pobj.actionBody.idempotentSource = "ename_icp";
} else if (pobj.actionBody.channel_type_code == 7) {
pobj.actionBody.type = "ename.edi";
pobj.actionBody.idempotentSource = "ename_edi";
}
}
if (pobj.actionBody.description && pobj.actionBody.description.indexOf("备#") < 0) {
pobj.actionBody.level = "A";
} else {
......
......@@ -18,6 +18,10 @@ class ExecClient {
this.cmdBaiduPostPattern = "curl -k -H 'Content-type: application/json' -H 'Authorization: {Authorization}' -d '{data}' {url}";
this.cmdGetpatternToken = "curl -G -k -H 'authorization:{token}' -d '{data}' {url}";
//易名
this.cmdEnamePostPattern = "curl -k -H 'Content-type: application/json' -d '{data}' {url}";
}
getUUID() {
var uuid = uuidv4();
......@@ -60,6 +64,14 @@ class ExecClient {
console.log(cmd);
return cmd;
}
FetchEnamePostCmd(subData, url) {
var data = JSON.stringify(subData);
var cmd = this.cmdEnamePostPattern.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
console.log(cmd);
return cmd;
}
FetchPushDataPostCmd(subData, url, token, requestId) {
var requestId = requestId || this.getUUID();
var data = JSON.stringify(subData);
......@@ -90,6 +102,11 @@ class ExecClient {
var result = await this.exec(cmd);
return result;
}
async execEnamePost(subData, url) {
let cmd = this.FetchEnamePostCmd(subData, url);
var result = await this.exec(cmd);
return result;
}
async execPushDataPost(subData, url, token, requestId) {
if(settings.env == 'dev'){
axios.defaults.headers['token'] = token;
......
......@@ -30,6 +30,13 @@ var settings = {
}
return "http://43.247.184.94:7200/center_channel_req_log/_doc?pretty";
},
enameClientUrl:function(){
if (this.env == 'dev') {
return "https://ote.ename.com/icp/";
}else{
return "https://ote.ename.com/icp/";
}
},
//百度icp、edi、nc、rt
baiduClientParams: function () {
if (this.env == 'dev') {
......
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