初始化
This commit is contained in:
6
src/api/auth.js
Normal file
6
src/api/auth.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { get, post } from './request'
|
||||
|
||||
// 登录鉴权相关接口
|
||||
export const loginApi = (data) => post('/auth/login', data) // {username, password, captcha}
|
||||
export const refreshApi = () => post('/auth/refresh') // 带旧 token 换新 token
|
||||
export const profileApi = () => get('/auth/profile', {}, { silent: true }) // 会话有效性校验
|
||||
Reference in New Issue
Block a user