feat:增加权限控制
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user