Commit 3d271e9e by 王栋源

wdy

parent 1b3beb78
...@@ -21,10 +21,10 @@ class TmQueryAPI extends WEBBase { ...@@ -21,10 +21,10 @@ class TmQueryAPI extends WEBBase {
if (!pobj.actionType) { if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空"); return system.getResult(null, "actionType参数不能为空");
} }
var result = await this.opActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody, req); var result = await this.opActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody, req, pobj);
return result; return result;
} }
async opActionProcess(action_process, action_type, action_body, req) { async opActionProcess(action_process, action_type, action_body, req, pobj) {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "test"://测试 case "test"://测试
...@@ -92,12 +92,12 @@ class TmQueryAPI extends WEBBase { ...@@ -92,12 +92,12 @@ class TmQueryAPI extends WEBBase {
opResult = await this.toolSve.icheming(action_body, req); opResult = await this.toolSve.icheming(action_body, req);
break; break;
case "tmreport"://商标报告 case "tmreport"://商标报告
var rtn=await this.tmquerySve.tmreport(action_body,req); var rtn = await this.tmquerySve.tmreport(action_body, pobj, req);
if(rtn.code>0){ if (rtn.code > 0) {
opResult=system.getResultSuccess(); opResult = system.getResultSuccess();
}else{ } else {
opResult=system.getResultFail(); opResult = system.getResultFail();
} }
break; break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
......
...@@ -74,8 +74,27 @@ class TmqueryService { ...@@ -74,8 +74,27 @@ class TmqueryService {
return await this.opReqResult(url, queryobj, req); return await this.opReqResult(url, queryobj, req);
} }
async tmreport(queryobj, req) { async tmreport(queryobj, pobj,req) {
var url = settings.igirlWeburl() + "web/toolCtl/createMonitoringReportH5p"; if (!queryobj.type) {
return { code: -102, msg: "参数错误" }
}
if (!queryobj.userId) {
return { code: -102, msg: "参数错误" }
}
if (queryobj.push_type == 1 && !queryobj.email) {
return { code: -102, msg: "参数错误" }
}
if (queryobj.push_type == 2 && !queryobj.notifyUrl) {
return { code: -102, msg: "参数错误" }
}
queryobj.wxuser_id = queryobj.userId;
queryobj.appid =pobj.appInfo.id;
var url = "";
if (queryobj.type == 1) {
url = settings.igirlWeburl() + "web/toolCtl/createMonitoringReportH5p";
} else if (queryobj.type == 2) {
url = settings.igirlWeburl() + "web/toolCtl/createPatentReportH5p";
}
return await this.opReqResult(url, queryobj, req); return await this.opReqResult(url, queryobj, req);
} }
......
...@@ -2663,9 +2663,13 @@ ...@@ -2663,9 +2663,13 @@
"actionType":"tmreport", "actionType":"tmreport",
"actionBody": "actionBody":
{ {
"companyname":"", //公司名称 "companyname":"汉唐信通(北京)咨询股份有限公司", //公司名称
"phonenum":"",  //电话 非必添 "phonenum":"", //电话  非必添
"email":"",   //邮箱 "notifyUrl":"https://icompanytest.gongsibao.com/api/addTmsgByTrademark", //回调地址  push_type 为2 时  不可为空
"email":"", //邮箱  push_type 为1 时  不可为空
"type":1, //报告类型  1 商标   2 专利
"push_type":1, //推送类型  1 邮件  2 接口
"userId":"001" //  用户id
} }
} }
......
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