From 35ca8e393c0fe3c1ad7128e5cf106e1d574741b5 Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Thu, 3 Aug 2023 09:31:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BDX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/home.ts | 11 +++ src/api/user.ts | 8 +-- src/views/welcome/index.vue | 129 +++++++++++++++++++++++------------- 4 files changed, 98 insertions(+), 52 deletions(-) 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 @@