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,