diff --git a/.env.development b/.env.development index 5794ede..4b61a58 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,5 @@ VITE_APP_ENV=development # 测试环境 API -VITE_API_BASE_URL=https://dbqb.nfdxy.net/activityApi \ No newline at end of file +VITE_API_BASE_URL=https://dbqb.nfdxy.net/activityApi +VITE_API_BASE_IMG_URL=http://39.101.133.168:8828 \ No newline at end of file diff --git a/.env.production b/.env.production index 78976f3..799ca07 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,5 @@ VITE_APP_ENV=production # 生产环境 API -VITE_API_BASE_URL=https://your-production-domain.com \ No newline at end of file +VITE_API_BASE_URL=https://your-production-domain.com +VITE_API_BASE_IMG_URL=http://tjapi.hlquant.com \ No newline at end of file diff --git a/src/views/admin/landingManagement.vue b/src/views/admin/landingManagement.vue index 35655dd..aab8f98 100644 --- a/src/views/admin/landingManagement.vue +++ b/src/views/admin/landingManagement.vue @@ -356,6 +356,7 @@ export default { // 提交表单(新增/编辑) async submitForm() { + const API_BASE_URL = import.meta.env.VITE_API_BASE_IMG_URL; this.$refs.formRef.validate( async (valid) => { if (valid) { let landingPageFlag = true @@ -366,7 +367,7 @@ export default { formData.append("type", "image"); formData.append("app_from", "toujiao"); const landingPageRes = await axios.post( - 'http://39.101.133.168:8828/hljwgo/api/file/upload', + API_BASE_URL+'/hljwgo/api/file/upload', formData, { headers: { "Content-Type": "multipart/form-data" } @@ -391,7 +392,7 @@ export default { popupFormData.append("type", "image"); popupFormData.append("app_from", "toujiao"); const popupRes =await axios.post( - 'http://39.101.133.168:8828/hljwgo/api/file/upload', + API_BASE_URL + '/hljwgo/api/file/upload', popupFormData, { headers: { "Content-Type": "multipart/form-data" }