Commit 3d271e9e by 王栋源

wdy

parent 1b3beb78
......@@ -21,10 +21,10 @@ class TmQueryAPI extends WEBBase {
if (!pobj.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;
}
async opActionProcess(action_process, action_type, action_body, req) {
async opActionProcess(action_process, action_type, action_body, req, pobj) {
var opResult = null;
switch (action_type) {
case "test"://测试
......@@ -92,11 +92,11 @@ class TmQueryAPI extends WEBBase {
opResult = await this.toolSve.icheming(action_body, req);
break;
case "tmreport"://商标报告
var rtn=await this.tmquerySve.tmreport(action_body,req);
if(rtn.code>0){
opResult=system.getResultSuccess();
}else{
opResult=system.getResultFail();
var rtn = await this.tmquerySve.tmreport(action_body, pobj, req);
if (rtn.code > 0) {
opResult = system.getResultSuccess();
} else {
opResult = system.getResultFail();
}
break;
default:
......
......@@ -74,8 +74,27 @@ class TmqueryService {
return await this.opReqResult(url, queryobj, req);
}
async tmreport(queryobj, req) {
var url = settings.igirlWeburl() + "web/toolCtl/createMonitoringReportH5p";
async tmreport(queryobj, pobj,req) {
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);
}
......
......@@ -2663,9 +2663,13 @@
"actionType":"tmreport",
"actionBody":
{
"companyname":"", //公司名称
"phonenum":"",  //电话 非必添
"email":"",   //邮箱
"companyname":"汉唐信通(北京)咨询股份有限公司", //公司名称
"phonenum":"", //电话  非必添
"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