From 4802eef97e7cd5f66db92c7438beca78423f685e Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Thu, 25 May 2023 13:47:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20h5=E5=8C=BA=E5=88=86=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=92=8C=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/.hbuilderx/launch.json | 4 ++++ yudao-ui-app/config/app.js | 6 ++---- yudao-ui-app/package.json | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/yudao-ui-app/.hbuilderx/launch.json b/yudao-ui-app/.hbuilderx/launch.json index ee5be7746..4bbcf3cba 100644 --- a/yudao-ui-app/.hbuilderx/launch.json +++ b/yudao-ui-app/.hbuilderx/launch.json @@ -10,6 +10,10 @@ { "launchtype" : "local" }, + "h5" : + { + "launchtype" : "local" + }, "mp-weixin" : { "launchtype" : "local" diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index 3f3bbf134..2932f77a1 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -1,14 +1,12 @@ -let domain = 'http://api.cyywl.top' -// let domain = 'http://192.168.1.147:48080' +let domain = process.env.APP_BASE_URL module.exports = { // 请求域名 格式: https://您的域名 // #ifdef MP HTTP_REQUEST_URL: domain, // #endif - HTTP_ADMIN_URL:'http://api.cyywl.top', //PC后台的API请求地址,上传图片用 - // HTTP_ADMIN_URL:'http://192.168.1.147:48080', //PC后台的API请求地址,上传图片用 + HTTP_ADMIN_URL: process.env.APP_BASE_URL, //PC后台的API请求地址,上传图片用 // #ifdef H5 //H5接口是浏览器地址 // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, diff --git a/yudao-ui-app/package.json b/yudao-ui-app/package.json index e147ae429..c33a2c9b1 100644 --- a/yudao-ui-app/package.json +++ b/yudao-ui-app/package.json @@ -13,5 +13,23 @@ "clipboard": "^2.0.11", "html-to-image": "^1.11.11", "qrcode": "^1.5.3" + }, + "uni-app": { + "scripts": { + "dev": { + "title": "开发版", + "env": { + "UNI_PLATFORM": "h5", + "APP_BASE_URL": "http://192.168.1.147:48080" + } + }, + "prod": { + "title": "生产版", + "env": { + "UNI_PLATFORM": "h5", + "APP_BASE_URL": "http://api.cyywl.top" + } + } + } } }