feat:增加权限控制

This commit is contained in:
2025-09-23 15:41:50 +08:00
parent e8a3339f43
commit 724561df55
8 changed files with 118 additions and 46 deletions

View File

@@ -1,16 +1,15 @@
import { cloudService } from './index'
import { ISession } from '@/types/auth'
export const loginHomeApi = (name: string, password: string): Promise<ISession> =>
cloudService({
url: '/home-service/session',
method: 'post',
params: { name, password }
})
export const loginAdminApi = (username: string, password: string): Promise<ISession> => {
const data = new FormData()
data.append('username', username)
data.append('password', password)
export const loginAdminApi = (name: string, password: string): Promise<ISession> =>
cloudService({
url: '/admin-service/session',
return cloudService({
url: '/blog-api/session',
method: 'post',
params: { name, password }
data
})
}