From 19a677fcc149c1ab0681f01f35b8a88e01383f1b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 15 Apr 2024 13:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=88=86=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +++ .env.hella13 | 2 ++ .env.hella14 | 2 ++ .env.hella15 | 2 ++ .env.hella16 | 2 ++ .env.hella8 | 2 ++ .env.hella9 | 2 ++ .env.production | 2 ++ .env.test | 3 +++ src/api/httpRequest3.js | 3 +-- src/api/request2.js | 6 ++---- 11 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 .env.development create mode 100644 .env.hella13 create mode 100644 .env.hella14 create mode 100644 .env.hella15 create mode 100644 .env.hella16 create mode 100644 .env.hella8 create mode 100644 .env.hella9 create mode 100644 .env.production create mode 100644 .env.test diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..c00b9fbb --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ + +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella13 b/.env.hella13 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella13 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella14 b/.env.hella14 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella14 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella15 b/.env.hella15 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella15 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella16 b/.env.hella16 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella16 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella8 b/.env.hella8 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella8 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.hella9 b/.env.hella9 new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.hella9 @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..6161f509 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..c00b9fbb --- /dev/null +++ b/.env.test @@ -0,0 +1,3 @@ + +VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index e3e374f8..29dd44a6 100644 --- a/src/api/httpRequest3.js +++ b/src/api/httpRequest3.js @@ -1,6 +1,5 @@ import storage from '../common/utils/storage' -import config from '../static/config.js' function service(options = {}) { var token = storage.getStorage(storage.constant.token) @@ -13,7 +12,7 @@ function service(options = {}) { // requestUrl = getApp().globalData.request_url // } var requestUrl = "" - requestUrl =config.request_url + requestUrl = import.meta.env.VITE_BASE_URL options.header = { "content-type": "application/json", diff --git a/src/api/request2.js b/src/api/request2.js index 274a1e26..95f16a9b 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -1,10 +1,8 @@ import request from './httpRequest3.js' import storage from '../common/utils/storage.js' -import config from '../static/config.js' -// const baseApi = "/api/admin-api" //公司地址 // 本地地址 -const baseApi = "" +const baseApi = '' /** * 获取验证码 * @param {*} @@ -3811,7 +3809,7 @@ export function getFileList(tableName, tableId) { */ export function uploadFile(tableName, tableId, filePath, callBack) { var token = storage.getStorage(storage.constant.token) - var url = config.request_url + baseApi + var url = import.meta.env.VITE_BASE_URL + baseApi uni.uploadFile({ url: url + "/infra/file/upload?tableName=" + tableName + "&tableId=" + tableId, filePath: filePath,