Commit cb5a9f62 by zhaoxiqing

gsb

parent 6313003f
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
class ActionAPI extends APIBase { class ActionAPI extends APIBase {
constructor() { constructor() {
super(); super();
...@@ -8,6 +9,7 @@ class ActionAPI extends APIBase { ...@@ -8,6 +9,7 @@ class ActionAPI extends APIBase {
this.commonSve = system.getObject("service.verify.commonSve") this.commonSve = system.getObject("service.verify.commonSve")
} }
/** /**
* 接口跳转 * 接口跳转
* action_process 执行的流程 * action_process 执行的流程
...@@ -38,14 +40,14 @@ class ActionAPI extends APIBase { ...@@ -38,14 +40,14 @@ class ActionAPI extends APIBase {
case "test": case "test":
opResult = await this.storderSve.test(action_body); opResult = await this.storderSve.test(action_body);
break; break;
case "TwoAutoSign"://二要素验证(E签宝) case "TwoFactorVerification"://二要素验证(E签宝)
opResult = await this.commonSve.TwoAutoSign(action_body); opResult = await this.commonSve.TwoFactorVerification(action_body);
break; break;
case "ThreeAutoSign"://三要素要素验证(兰铂旺) case "ThreeFactorVerification"://三要素要素验证(兰铂旺)
opResult = await this.commonSve.ThreeAutoSign(action_body); opResult = await this.commonSve.ThreeFactorVerification(action_body);
break; break;
case "FourAutoSign"://四要素要素验证(兰铂旺) case "FourFactorVerification"://四要素要素验证(兰铂旺)
opResult = await this.commonSve.FourAutoSign(action_body); opResult = await this.commonSve.FourFactorVerification(action_body);
break; break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
...@@ -53,9 +55,11 @@ class ActionAPI extends APIBase { ...@@ -53,9 +55,11 @@ class ActionAPI extends APIBase {
} }
return opResult; return opResult;
} }
exam() { exam() {
return `<pre><pre/>`; return `<pre><pre/>`;
} }
classDesc() { classDesc() {
return { return {
groupName: "op", groupName: "op",
...@@ -65,6 +69,7 @@ class ActionAPI extends APIBase { ...@@ -65,6 +69,7 @@ class ActionAPI extends APIBase {
exam: "", exam: "",
}; };
} }
methodDescs() { methodDescs() {
return [ return [
{ {
...@@ -96,4 +101,5 @@ class ActionAPI extends APIBase { ...@@ -96,4 +101,5 @@ class ActionAPI extends APIBase {
]; ];
} }
} }
module.exports = ActionAPI; module.exports = ActionAPI;
...@@ -12,18 +12,29 @@ class CommonService extends ServiceBase { ...@@ -12,18 +12,29 @@ class CommonService extends ServiceBase {
} }
async TwoAutoSign(params) { async TwoFactorVerification(params) {
if (!params.id_name) { if (!params.id_name) {
return system.getResultFail(-1, "请提供该用户姓名") return system.getResultFail(-1, "请提供该用户姓名")
} }
if (!params.id_no) { if (!params.id_no) {
return system.getResultFail(-1, "请提供该用户身份证号") return system.getResultFail(-1, "请提供该用户身份证号")
} }
var vparam = {
var autoData = await this.authSve.findOne({
channel:1,
auth_type:2,
id_name: params.id_name,
id_no: params.id_no,
result: 1
});
if (autoData) {
return system.getResultSuccess("验证通过");
}
var bankTwoparam = {
name: params.id_name, name: params.id_name,
idno: params.id_no, idno: params.id_no,
}; };
var threeResult = await this.eSignBaoUtil.personTwo(vparam, "TwoAutoSign"); var threeResult = await this.eSignBaoUtil.personTwo(bankTwoparam, "TwoAutoSign");
this.authSve.create({ this.authSve.create({
id_name: params.id_name, id_name: params.id_name,
id_no: params.id_no, id_no: params.id_no,
...@@ -38,7 +49,7 @@ class CommonService extends ServiceBase { ...@@ -38,7 +49,7 @@ class CommonService extends ServiceBase {
return system.getResultSuccess("验证通过"); return system.getResultSuccess("验证通过");
} }
async ThreeAutoSign(params) { async ThreeFactorVerification(params) {
if (!params.id_name) { if (!params.id_name) {
return system.getResultFail(-1, "请提供该用户姓名") return system.getResultFail(-1, "请提供该用户姓名")
} }
...@@ -66,6 +77,8 @@ class CommonService extends ServiceBase { ...@@ -66,6 +77,8 @@ class CommonService extends ServiceBase {
var threeResult = await this.lSignBaoUtil.bankthree(bankthreeParams, "ThreeAutoSign"); var threeResult = await this.lSignBaoUtil.bankthree(bankthreeParams, "ThreeAutoSign");
this.authSve.create({ this.authSve.create({
channel:2,
auth_type:3,
id_name: params.id_name, id_name: params.id_name,
id_no: params.id_no, id_no: params.id_no,
bank_no: params.bank_no, bank_no: params.bank_no,
...@@ -81,7 +94,7 @@ class CommonService extends ServiceBase { ...@@ -81,7 +94,7 @@ class CommonService extends ServiceBase {
return system.getResultSuccess("验证通过"); return system.getResultSuccess("验证通过");
} }
async FourAutoSign(params) { async FourFactorVerification(params) {
if (!params.id_name) { if (!params.id_name) {
return system.getResultFail(-1, "请提供该用户姓名"); return system.getResultFail(-1, "请提供该用户姓名");
} }
...@@ -103,6 +116,8 @@ class CommonService extends ServiceBase { ...@@ -103,6 +116,8 @@ class CommonService extends ServiceBase {
var threeResult = await this.lSignBaoUtil.bankfour(bankFourParams, "FourAutoSign"); var threeResult = await this.lSignBaoUtil.bankfour(bankFourParams, "FourAutoSign");
this.authSve.create({ this.authSve.create({
channel:2,
auth_type:4,
id_name: params.id_name, id_name: params.id_name,
id_no: params.id_no, id_no: params.id_no,
bank_no: params.bank_no, bank_no: params.bank_no,
...@@ -118,11 +133,6 @@ class CommonService extends ServiceBase { ...@@ -118,11 +133,6 @@ class CommonService extends ServiceBase {
return system.getResultSuccess("验证通过"); return system.getResultSuccess("验证通过");
} }
async getauth(){
}
} }
module.exports = CommonService; module.exports = CommonService;
...@@ -6,7 +6,7 @@ var settings={ ...@@ -6,7 +6,7 @@ var settings={
db:10, db:10,
}, },
database:{ database:{
dbname : "bpo_sign", dbname : "engine-sign",
user: "write", user: "write",
password: "write", password: "write",
config: { config: {
......
...@@ -25,7 +25,7 @@ var settings = { ...@@ -25,7 +25,7 @@ var settings = {
secret: "f99d413b767f09b5dff0b3610366cc46", secret: "f99d413b767f09b5dff0b3610366cc46",
}, },
basepath: path.normalize(path.join(__dirname, '../..')), basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 3110, port: process.env.NODE_PORT || 3574,
reqEsAddr: function () { reqEsAddr: function () {
if (this.env == "dev") { if (this.env == "dev") {
var localsettings = require("./localsettings"); var localsettings = require("./localsettings");
......
...@@ -381,6 +381,14 @@ ...@@ -381,6 +381,14 @@
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
"dev": true "dev": true
}, },
"axios": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"requires": {
"follow-redirects": "1.5.10"
}
},
"babel-helper-vue-jsx-merge-props": { "babel-helper-vue-jsx-merge-props": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
...@@ -2147,6 +2155,24 @@ ...@@ -2147,6 +2155,24 @@
"integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=",
"dev": true "dev": true
}, },
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "=3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
......
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