From 1204b77c7dec95c461668fec03d9de6bd8c424ae Mon Sep 17 00:00:00 2001 From: sa_10_0 <2492740167@qq.com> Date: Tue, 18 Feb 2025 14:06:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 +- src/api/myAxios.ts | 4 +- src/views/Coupons/AddCoupons.vue | 68 ++++++------------------------ src/views/Coupons/CouponCenter.vue | 62 ++++++++------------------- 4 files changed, 33 insertions(+), 104 deletions(-) diff --git a/src/App.vue b/src/App.vue index e222a33..be62b8c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,8 +22,9 @@ onMounted(()=>{ checkLoginState() }) const checkLoginState = async ()=>{ //监测登陆状态 + console.log("start") const res = await myAxios.get('/user/get/login') - console.log(res) + console.log("end") if(res.data.code != 1) { router.push('/') } diff --git a/src/api/myAxios.ts b/src/api/myAxios.ts index a9d70c4..62ab694 100644 --- a/src/api/myAxios.ts +++ b/src/api/myAxios.ts @@ -4,8 +4,8 @@ import router from '../router' const myAxios = axios.create({ withCredentials:true, - // baseURL: 'http://localhost:9092/api' - baseURL: 'http://123.249.108.160:8888/api' //测试服务器 + baseURL: 'http://localhost:9092/api' + // baseURL: 'http://123.249.108.160:8888/api' //测试服务器 }); // 添加请求拦截器 axios.interceptors.request.use(function (config) { diff --git a/src/views/Coupons/AddCoupons.vue b/src/views/Coupons/AddCoupons.vue index fc60cc9..fc68623 100644 --- a/src/views/Coupons/AddCoupons.vue +++ b/src/views/Coupons/AddCoupons.vue @@ -1,19 +1,5 @@