maziyang 3 months ago
parent
commit
9c9dd7d005
  1. 3
      .env.development
  2. 3
      .env.production
  3. 5
      src/views/admin/landingManagement.vue

3
.env.development

@ -2,4 +2,5 @@
VITE_APP_ENV=development
# 测试环境 API
VITE_API_BASE_URL=https://dbqb.nfdxy.net/activityApi
VITE_API_BASE_URL=https://dbqb.nfdxy.net/activityApi
VITE_API_BASE_IMG_URL=http://39.101.133.168:8828

3
.env.production

@ -2,4 +2,5 @@
VITE_APP_ENV=production
# 生产环境 API
VITE_API_BASE_URL=https://your-production-domain.com
VITE_API_BASE_URL=https://your-production-domain.com
VITE_API_BASE_IMG_URL=http://tjapi.hlquant.com

5
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" }

Loading…
Cancel
Save