| 1234567891011121314151617181920212223242526272829 |
- import { ApiInstance } from '../type'
- interface LoginData {
- userName: string
- passWord: string
- captcha: string
- system: string
- captchaId: number
- }
- interface PasswordEditData {
- password: string
- newpassword: string
- }
- const userApi = (axiosInstance: ApiInstance) => ({
- // 登录
- login: (data: LoginData) => axiosInstance.post('auth/login', data, {
- }),
- // 获取权限
- permission: () => axiosInstance.get('auth/getUserPer', {
- }),
- // 修改密码
- passwordEdit: (data: PasswordEditData) => axiosInstance.post('user/password/edit', data, {
- baseURL: '/mock/',
- }),
- })
- export default userApi
|