diff --git a/.env.development b/.env.development index ec6e38a..bfdecce 100644 --- a/.env.development +++ b/.env.development @@ -8,4 +8,4 @@ VITE_PUBLIC_PATH = / VITE_ROUTER_HISTORY = "hash" # 开发环境后端地址 -VITE_APP_BASE_URL = 'http://192.168.10.81:8848' \ No newline at end of file +VITE_APP_BASE_URL = 'http://192.168.10.13:8000' \ No newline at end of file diff --git a/src/api/home.ts b/src/api/home.ts index bd13a98..39cfd2e 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -5,7 +5,18 @@ type Result = { count: number; results?: Array; }; +type Data = { + success: boolean; + msg: any; + results?: Array; +}; export const getHomeList = (params?: object) => { return http.request("get", baseUrlApi(""), { params }); }; +export const getEvents = (params?: object) => { + return http.request("get", baseUrlApi("events"), { params }); +}; +export const updateHomeList = (params?: object) => { + return http.request("put", baseUrlApi(""), { params }); +}; diff --git a/src/api/user.ts b/src/api/user.ts index 10de275..6aac1cc 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -33,12 +33,12 @@ export type RefreshTokenResult = { }; /** 登录 */ -export const getLogin = (data?: object) => { - return http.request("post", "/login", { data }); -}; // export const getLogin = (data?: object) => { -// return http.request("post", baseUrlApi("login"), { data }); +// return http.request("post", "/login", { data }); // }; +export const getLogin = (data?: object) => { + return http.request("post", baseUrlApi("login"), { data }); +}; // export const getLogin = (data?: object) => { // const AdminHostUrl = getConfig().AdminHostUrl; diff --git a/src/views/welcome/index.vue b/src/views/welcome/index.vue index 84ecc75..58ab268 100644 --- a/src/views/welcome/index.vue +++ b/src/views/welcome/index.vue @@ -1,24 +1,27 @@