From d96ac8cf54a2ce183c88fb662bd38a7e991bbfa9 Mon Sep 17 00:00:00 2001 From: chansee97 Date: Sun, 24 Mar 2024 22:13:07 +0800 Subject: [PATCH] fix: simplified store --- build/proxy.ts | 4 +- src/layouts/components/tab/TabBar.vue | 28 ++++++- src/service/api/test.ts | 14 +++- src/service/http/alova.ts | 2 +- src/service/http/index.ts | 6 +- src/store/auth.ts | 26 ++----- src/store/route.ts | 86 ++++++++-------------- src/store/tab.ts | 3 + src/typings/service.d.ts | 2 +- src/views/login/components/Login/index.vue | 10 ++- src/views/test/test1/index.vue | 30 +++++++- 11 files changed, 119 insertions(+), 92 deletions(-) diff --git a/build/proxy.ts b/build/proxy.ts index d11829d..19fe5fd 100644 --- a/build/proxy.ts +++ b/build/proxy.ts @@ -3,7 +3,7 @@ import type { ProxyOptions } from 'vite' /** 不同请求服务的环境配置 */ export const proxyConfig: Record = { dev: { - url: 'http://localhost:3000', + url: 'https://mock.apifox.com/m1/4071143-0-default', urlPattern: '/url-pattern', }, test: { @@ -11,7 +11,7 @@ export const proxyConfig: Record = { urlPattern: '/url-pattern', }, prod: { - url: 'http://localhost:8080', + url: 'https://mock.apifox.com/m1/4071143-0-default', urlPattern: '/url-pattern', }, } diff --git a/src/layouts/components/tab/TabBar.vue b/src/layouts/components/tab/TabBar.vue index 3cb5d85..8d1f885 100644 --- a/src/layouts/components/tab/TabBar.vue +++ b/src/layouts/components/tab/TabBar.vue @@ -1,7 +1,8 @@