From dce88b7aa48e95895dc177ca2ae1234867ead8dd Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 18 Jul 2023 15:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/config.js | 12 +++--------- web/package.json | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/web/config.js b/web/config.js index 2d28471..ea80bd4 100644 --- a/web/config.js +++ b/web/config.js @@ -15,20 +15,16 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md, // // 启动参数 args.option(['p', 'port'], '启动端口'); args.option(['u', 'api-url'], 'webapi的URL'); -args.option('apiAnxinyunUrl', "安心云api"); -args.option('axyProject', '安心云泵站项目信息'); + const flags = args.parse(process.argv); const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; -const API_ANXINYUN_URL = process.env.API_ANXINYUN_URL || flags.apiAnxinyunUrl -const AXY_BZ_PROJECT = process.env.AXY_BZ_PROJECT || flags.axyProject if ( !FS_UNIAPP_API - || !API_ANXINYUN_URL ) { console.log('缺少启动参数,异常退出'); args.showHelp(); @@ -47,8 +43,7 @@ const product = { }, { entry: require('./middlewares/proxy').entry, opts: { - host: API_ANXINYUN_URL, - match: /^\/_axy\//, + } }, { entry: require('./middlewares/attachment').entry, @@ -59,8 +54,7 @@ const product = { }, { entry: require('./routes').entry, opts: { - axyApi: API_ANXINYUN_URL, - axyProject: AXY_BZ_PROJECT + } }, { entry: require('./client').entry,// 静态信息 diff --git a/web/package.json b/web/package.json index a1e17ed..36047ba 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "mocha", "start": "cross-env NODE_ENV=development npm run start-params", - "start-params": "node server -p 5900 -u http://127.0.0.1:4900 --apiAnxinyunUrl https://openapi.anxinyun.cn/api/v1 --axyProject 1a271f12-52f2-4d16-8dad-ec0c92d3e0cc/03bzzdh/123456", + "start-params": "node server -p 5900 -u http://127.0.0.1:4900", "deploy": "export NODE_ENV=production && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js"