Browse Source

GodTransRequest

release_0.0.1
巴林闲侠 2 years ago
parent
commit
da0f515841
  1. 4
      web/client/src/utils/webapi.js
  2. 18
      web/config.js
  3. 2
      web/package.json

4
web/client/src/utils/webapi.js

@ -1,5 +1,7 @@
'use strict'; 'use strict';
import request from 'superagent'; import { ProxyRequest } from "@peace/utils";
export const GodTransRequest = new ProxyRequest("_godTrans");
export const ApiTable = { export const ApiTable = {
login: 'login', login: 'login',

18
web/config.js

@ -19,9 +19,6 @@ args.option(['r', 'report-node'], '报表进程地址');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
const FS_REPORT_NODE = process.env.FS_REPORT_NODE || flags.reportNode || 'http://10.8.30.59:8083'
if (!FS_UNIAPP_API) { if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出'); console.log('缺少启动参数,异常退出');
@ -39,20 +36,11 @@ const product = {
match: /^\/_api\//, match: /^\/_api\//,
} }
}, }, {
{
entry: require('./middlewares/proxy').entry, entry: require('./middlewares/proxy').entry,
opts: { opts: {
host: 'https://report.amap.com',
host: FS_REPORT_NODE, match: /^\/_godTrans\//,
match: /^\/_report\//,
}
},
{
entry: require('./routes').entry,
opts: {
apiUrl: FS_UNIAPP_API,
staticRoot: './client',
} }
}, { }, {
entry: require('./client').entry,// 静态信息 entry: require('./client').entry,// 静态信息

2
web/package.json

@ -68,7 +68,7 @@
"@antv/g6": "^4.2.5", "@antv/g6": "^4.2.5",
"@fs/attachment": "^1.0.0", "@fs/attachment": "^1.0.0",
"@peace/components": "0.0.35", "@peace/components": "0.0.35",
"@peace/utils": "0.0.37", "@peace/utils": "^0.0.51",
"antd": "^4.19.2", "antd": "^4.19.2",
"antd-theme-generator": "^1.2.8", "antd-theme-generator": "^1.2.8",
"args": "^5.0.1", "args": "^5.0.1",

Loading…
Cancel
Save