From 7c377f02eb307a0bf2f34b200fd9e847eb66b99f Mon Sep 17 00:00:00 2001 From: bestlee Date: Thu, 25 Jun 2026 11:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E5=92=8C?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/api/request.js b/src/api/request.js index a142993..e015011 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -2,9 +2,12 @@ import axios from 'axios'; import router from '@/router' import { showNotify } from 'vant'; -// const url = 'http://192.168.0.230'; -const url = window.location.origin; - +let url = ''; +if(import.meta.env.MODE === 'development'){ + url = 'http://192.168.0.230'; +}else{ + url = window.location.origin; +} axios.defaults.baseURL = url; axios.defaults.withCredentials = false; axios.defaults.timeout = 200000;