From cee338f18d22bbbb989d79c0add082fdb4e2b8ef Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 08 Sep 2023 11:09:00 +0800
Subject: [PATCH] store添加projectId

---
 src/api/manage.ts |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/api/manage.ts b/src/api/manage.ts
index d2d0d52..34afc15 100644
--- a/src/api/manage.ts
+++ b/src/api/manage.ts
@@ -2,13 +2,12 @@
 import request, { CommonListResponse, IListWorkspaceResponse, IPage, IWorkspaceResponse } from '/@/api/http/request'
 import { Device } from '/@/types/device'
 
-const HTTP_PREFIX = '/manage/api/v1'
+const HTTP_PREFIX = 'system/auth'
 
 // login
 export interface LoginBody {
  username: string,
  password: string,
- flag: number,
 }
 export interface BindBody {
   device_sn: string,
@@ -29,11 +28,17 @@
 }
 
 export const login = async function (body: LoginBody): Promise<IWorkspaceResponse<any>> {
-  const url = `${HTTP_PREFIX}/login`
+  const url = 'api/system/auth/login/password'
   const result = await request.post(url, body)
   return result.data
 }
 
+export const loginOut = async function (): Promise<IWorkspaceResponse<any>> {
+  const url = `api/${HTTP_PREFIX}/logout`
+  const result = await request.delete(url)
+  return result.data
+}
+
 // Refresh Token
 export const refreshToken = async function (body: {}): Promise<IWorkspaceResponse<any>> {
   const url = `${HTTP_PREFIX}/token/refresh`

--
Gitblit v1.9.3