From 346e4036fd473430fd347fb91019fce185f1ff5b Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Thu, 8 Jun 2023 12:26:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=90=E8=A1=8C=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/{.env.front => .env.test} | 4 ++-- yudao-ui-admin/package.json | 3 ++- yudao-ui-admin/src/settings.js | 2 +- yudao-ui-app/config/app.js | 8 ++++++++ yudao-ui-app/package.json | 17 +++++++++++++++++ 5 files changed, 30 insertions(+), 4 deletions(-) rename yudao-ui-admin/{.env.front => .env.test} (83%) diff --git a/yudao-ui-admin/.env.front b/yudao-ui-admin/.env.test similarity index 83% rename from yudao-ui-admin/.env.front rename to yudao-ui-admin/.env.test index d36aa63b6..894171859 100644 --- a/yudao-ui-admin/.env.front +++ b/yudao-ui-admin/.env.test @@ -1,11 +1,11 @@ # 开发环境配置 -ENV = 'development' +ENV = 'test' # 页面标题 VUE_APP_TITLE = 创盈商户管理系统 # 创盈管理系统/本地环境 -VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' +VUE_APP_BASE_API = 'http://api.nnhwl.top' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json index 295c8e0f5..3adf5bf67 100644 --- a/yudao-ui-admin/package.json +++ b/yudao-ui-admin/package.json @@ -7,10 +7,11 @@ "scripts": { "local": "vue-cli-service serve --mode local", "dev": "vue-cli-service serve --mode dev", - "front": "vue-cli-service serve --mode front", + "test": "vue-cli-service serve --mode test", "build:prod": "vue-cli-service build --mode prod", "build:stage": "vue-cli-service build --mode stage", "build:dev": "vue-cli-service build --mode dev", + "build:test": "vue-cli-service build --mode test", "build:static": "vue-cli-service build --mode static", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src", diff --git a/yudao-ui-admin/src/settings.js b/yudao-ui-admin/src/settings.js index c3be16571..7c73fb448 100644 --- a/yudao-ui-admin/src/settings.js +++ b/yudao-ui-admin/src/settings.js @@ -3,7 +3,7 @@ module.exports = { /** * 推广链接域名 */ - spreadDomain: 'http://h5.cyywl.top', + spreadDomain: process.env.ENV === 'production' ? 'http://h5.cyywl.top' : 'http://h5.nnhwl.top', /** * 推广码生成访问H5链接地址 diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index 605d8d33c..628415493 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -29,7 +29,15 @@ module.exports = { //分页最多显示条数 LIMIT: 10, // 推广链接域名 + // #ifdef DEV + SPREAD_DOMAIN: 'http://h5.nnhwl.top', + // #endif + // #ifdef TEST + SPREAD_DOMAIN: 'http://h5.nnhwl.top', + // #endif + // #ifdef PROD SPREAD_DOMAIN: 'http://h5.cyywl.top', + // #endif // 推广码生成访问H5链接地址 SPREAD_LINK: '/pages/member_application/index', }; diff --git a/yudao-ui-app/package.json b/yudao-ui-app/package.json index a991192ef..24d13dabf 100644 --- a/yudao-ui-app/package.json +++ b/yudao-ui-app/package.json @@ -22,6 +22,20 @@ "UNI_PLATFORM": "h5", "isVConsole": true, "APP_BASE_URL": "http://192.168.1.188:48080" + }, + "define": { + "DEV": true + } + }, + "test": { + "title": "测试版", + "env": { + "UNI_PLATFORM": "h5", + "isVConsole": true, + "APP_BASE_URL": "http://api.nnhwl.top" + }, + "define": { + "TEST": true } }, "prod": { @@ -30,6 +44,9 @@ "UNI_PLATFORM": "h5", "isVConsole": false, "APP_BASE_URL": "http://api.cyywl.top" + }, + "define": { + "PROD": true } } }