mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-10-04 17:14:19 +00:00
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
import service from '@/utils/request'
|
|
|
|
// @Summary 用户登录
|
|
// @Produce application/json
|
|
// @Param data body {username:"string",password:"string"}
|
|
// @Router /base/login [post]
|
|
export const login = (data) => {
|
|
return service({
|
|
url: "/base/login",
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// @Summary 用户注册
|
|
// @Produce application/json
|
|
// @Param data body {username:"string",password:"string"}
|
|
// @Router /base/resige [post]
|
|
export const regist = (data) => {
|
|
return service({
|
|
url: "/base/regist",
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// @Tags User
|
|
// @Summary 分页获取用户列表
|
|
// @Security ApiKeyAuth
|
|
// @accept application/json
|
|
// @Produce application/json
|
|
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
|
|
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
// @Router /user/getUserList [post]
|
|
export const getUserList = (data) => {
|
|
return service({
|
|
url: "/user/getUserList",
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
} |