Commit 769f527a by 赵庆

添加insert

parent 3135940d
......@@ -4,7 +4,7 @@ var settings = require("../../../../config/settings");
class ActionAPI extends APIBase {
constructor() {
super();
this.merchantSve = system.getObject("service.merchant.merchantSve");
this.ecloudsignSve = system.getObject("service.sign.ecloudsignSve");
}
/**
* 接口跳转
......@@ -32,20 +32,55 @@ class ActionAPI extends APIBase {
async handleRequest(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// 商户api
case "nameList":
opResult = await this.merchantSve.apiNameList(action_body);
// 三要素 四要素验证
case "bankVerify":
opResult = await this.ecloudsignSve.apibankVerify(action_body);
break;
//申请证书
case "applyCert":
opResult = await this.ecloudsignSve.apiapplyCert(action_body);
break;
//添加签名/印章
case "addSign":
opResult = await this.ecloudsignSve.apiaddSign(action_body);
break;
//添加模板
case "addHtmlTemplate":
opResult = await this.ecloudsignSve.apiaddHtmlTemplate(action_body);
break;
//根据模板生成合同文档
case "createContractByTemplate":
opResult = await this.ecloudsignSve.apicreateContractByTemplate(action_body);
break;
//合同签署动态验证码发送
case "sendSms":
opResult = await this.ecloudsignSve.apisendSms(action_body);
break;
//用户授权验证签署合同
case "authorizeSign":
opResult = await this.ecloudsignSve.apiauthorizeSign(action_body);
break;
//合同详情下载
case "downloadCont":
opResult = await this.ecloudsignSve.apidownloadCont(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
exam() {
return `<pre><pre/>`;
}
classDesc() {
return {
groupName: "op",
......
const system = require("../../../system");
const ServiceBase = require("../../sve2.base")
const settings = require("../../../../config/settings")
class SignService extends ServiceBase {
constructor() {
}
async apiNameList(params) {
try {
return await this.nameList(params);
} catch (error) {
console.log(error)
return system.getResult(null, "接口异常");
}
}
// -----------------------以此间隔,上面为API,下面为service---------------------------------
async nameList() {
var nameList = await this.dao.nameList();
return system.getResultSuccess(nameList);
}
}
super("merchant", ServiceBase.getDaoName(SignService));
module.exports = MerchantService;
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