Commit c1a5d1ed by 王昆

gsb

parent 976f4ed7
......@@ -56,5 +56,63 @@ class DeliverCtl extends CtlBase {
}
}
async deliverUserPage(pobj, pobj2, req) {
try {
return await this.deliverSve.deliverUserPage(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async deliverUserById(pobj, pobj2, req) {
try {
return await this.deliverSve.deliverUserById(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async deliverUserSave(pobj, pobj2, req) {
try {
return await this.deliverSve.deliverUserSave(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async allOrg(pobj, pobj2, req) {
try {
return await this.deliverSve.allOrg(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async orgTree(pobj, pobj2, req) {
try {
return await this.deliverSve.orgTree(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async orgById(pobj, pobj2, req) {
try {
return await this.deliverSve.orgById(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async orgSave(pobj, pobj2, req) {
try {
return await this.deliverSve.orgSave(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
}
module.exports = DeliverCtl;
\ No newline at end of file
......@@ -41,6 +41,7 @@ class UserCtl extends CtlBase {
var xggadminsid = await this.setLogin(loginUser);
let rs = {
key: xggadminsid,
isManager: loginUser.isManager,
menus: {gtArr: this.getOrderMenu(loginUser), pjArr: this.getInvoiceMenu(loginUser)}
};
......
......@@ -48,6 +48,29 @@ class DeliverService extends ServiceBase {
return await this.callms("common", "deliverDelete", params);
}
async deliverUserPage(params) {
return await this.callms("common", "deliverUserPage", params);
}
async deliverUserById(params) {
return await this.callms("common", "deliverUserById", params);
}
async deliverUserSave(params) {
return await this.callms("common", "deliverUserSave", params);
}
async allOrg(params) {
return await this.callms("common", "allOrg", params);
}
async orgTree(params) {
return await this.callms("common", "orgTree", params);
}
async orgById(params) {
return await this.callms("common", "orgById", params);
}
async orgSave(params) {
return await this.callms("common", "orgSave", params);
}
async doPercent(rows) {
if(!rows) {
return;
......
......@@ -2,6 +2,9 @@ const system = require("../system");
const moment = require('moment')
const settings = require("../../config/settings");
const md5 = require("MD5");
const axios = require('axios');
class ServiceBase {
constructor() {
this.restClient = system.getObject("util.restClient");
......@@ -221,6 +224,16 @@ class ServiceBase {
"action_body": params || {},
}
if(settings.env == 'dev') {
let rs = await axios({
method: 'post',
url: reqUrl,
data: params
});
console.log(rs);
return rs.data;
}
var rs = await this.restClient.execPost(params, reqUrl);
if (rs && rs.stdout) {
return JSON.parse(rs.stdout);
......
......@@ -169,27 +169,28 @@ class System {
console.log(settings.env, "-------------- microsetting env ------------------");
var path = "/api/op/action/springboard";
if (settings.env == "dev") {
var domain = "http://192.168.18.237";
// var domain = "http://127.0.0.1";
// var domain = "http://192.168.18.237";
var domain = "http://127.0.0.1";
var domain2 = "http://39.107.234.14";
return {
// 公共服务
common: domain + ":3102" + path,
common: domain2 + ":3102" + path,
// common: "http://127.0.0.1:3102" + path,
// 商户服务
merchant: domain + ":3101" + path,
merchant: domain2 + ":3101" + path,
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
// order: domain + ":3103" + path,
order: "http://127.0.0.1:3103" + path,
order: domain2 + ":3103" + path,
// order: "http://127.0.0.1:3103" + path,
// 发票服务
invoice: domain + ":3105" + path,
invoice: domain2 + ":3105" + path,
// invoice: "http://127.0.0.1:3105" + path,
// 发票服务
uc: domain + ":3106" + path,
uc: domain2 + ":3106" + path,
// uc: "http://127.0.0.1:3106" + path,
}
} else {
......
......@@ -354,6 +354,14 @@
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
"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": {
"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",
......@@ -2115,6 +2123,24 @@
"integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=",
"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": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
......
......@@ -12,6 +12,7 @@
"MD5": "^1.3.0",
"after": "^0.8.2",
"ali-oss": "^4.12.2",
"axios": "^0.19.2",
"babel-polyfill": "^6.26.0",
"base64id": "^1.0.0",
"bluebird": "^3.5.1",
......
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