diff --git a/.env.development b/.env.development index 3669283..05d2c29 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,12 @@ +### + # @Author: donghao donghao@supervision.ltd + # @Date: 2025-03-12 15:26:57 + # @LastEditors: donghao donghao@supervision.ltd + # @LastEditTime: 2025-03-13 09:17:19 + # @FilePath: \5G-Loading-Bay-Web\.env.development + # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +### # .env.development NODE_ENV = development VITE_APP_ENV = development -VITE_APP_BASE_API = http://192.168.10.14:8888 +VITE_APP_BASE_API = http://192.168.10.14:8000 diff --git a/src/api/dashboard.ts b/src/api/dashboard.ts index 7e37d17..55dea2d 100644 --- a/src/api/dashboard.ts +++ b/src/api/dashboard.ts @@ -1 +1,20 @@ -// 接口层 \ No newline at end of file +/* + * @Author: donghao donghao@supervision.ltd + * @Date: 2025-03-07 15:09:18 + * @LastEditors: donghao donghao@supervision.ltd + * @LastEditTime: 2025-03-13 10:13:49 + * @FilePath: \5G-Loading-Bay-Web\src\api\dashboard.ts + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ +// 接口层 + +import request from "@/utils/request/instance"; +import { config } from "@/config"; + +//TODO 定义响应类型 + + +export const getDeviceStatusApi = (params: any) => { + return request.get(`/api/v1/device/device/`, params); +}; + diff --git a/src/api/user.ts b/src/api/user.ts index ff83f21..5bdc07f 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-03-12 15:13:38 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-03-12 19:20:43 + * @LastEditTime: 2025-03-13 09:29:20 * @FilePath: \5G-Loading-Bay-Web\src\api\user.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -19,11 +19,16 @@ interface LoginRes { } export const loginApi = (data: { username: string; password: string }) => { - return request.post(`${config.baseURL}/api/v1/user/login`, data, { + return request.post(`/api/v1/user/login/`, data, { showLoading: false // 单独关闭loading }) } +export const loginOutApi = () => { + return request.post(`/api/v1/user/logout/`, {}, { + showLoading: false // 单独关闭loading + }) +} // export const getUserInfo = (userId: number) => { // return request.get(`/user/info/${userId}`) // } \ No newline at end of file diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 8bf2ea0..9762a86 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -2,12 +2,13 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-03-06 15:42:11 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-03-11 15:42:37 + * @LastEditTime: 2025-03-13 10:49:12 * @FilePath: \vite-ai\data-dashboard\src\components\Navbar.vue * @Description: 标题栏 --> - - \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 0b2f868..cb52394 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-03-06 11:27:03 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-03-12 19:38:36 + * @LastEditTime: 2025-03-13 09:35:33 * @FilePath: \vite-ai\data-dashboard\vite.config.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */