| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- 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
- })
- }
- export const login2 = (data) => {
- return service({
- url: '/base/autologin',
- method: 'post',
- data: data
- })
- }
- // @Summary 获取验证码
- // @Produce application/json
- // @Param data body {username:"string",password:"string"}
- // @Router /base/captcha [post]
- export const captcha = (data) => {
- return service({
- url: '/base/captcha',
- method: 'post',
- data: data
- })
- }
- // @Summary 用户注册
- // @Produce application/json
- // @Param data body {username:"string",password:"string"}
- // @Router /base/resige [post]
- export const register = (data) => {
- return service({
- url: '/user/admin_register',
- method: 'post',
- data: data
- })
- }
- // @Summary 修改密码
- // @Produce application/json
- // @Param data body {username:"string",password:"string",newPassword:"string"}
- // @Router /user/changePassword [post]
- export const changePassword = (data) => {
- return service({
- url: '/user/changePassword',
- 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
- })
- }
- // @Tags User
- // @Summary 设置用户权限
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.SetUserAuth true "设置用户权限"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"修改成功"}"
- // @Router /user/setUserAuthority [post]
- export const setUserAuthority = (data) => {
- return service({
- url: '/user/setUserAuthority',
- method: 'post',
- data: data
- })
- }
- // @Tags SysUser
- // @Summary 删除用户
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body request.SetUserAuth true "删除用户"
- // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
- // @Router /user/deleteUser [delete]
- export const deleteUser = (data) => {
- return service({
- url: '/user/deleteUser',
- method: 'delete',
- data: data
- })
- }
- // @Tags SysUser
- // @Summary 设置用户信息
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body model.SysUser true "设置用户信息"
- // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
- // @Router /user/setUserInfo [put]
- export const setUserInfo = (data) => {
- return service({
- url: '/user/setUserInfo',
- method: 'put',
- data: data
- })
- }
- // @Tags SysUser
- // @Summary 设置用户信息
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body model.SysUser true "设置用户信息"
- // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
- // @Router /user/setSelfInfo [put]
- export const setSelfInfo = (data) => {
- return service({
- url: '/user/setSelfInfo',
- method: 'put',
- data: data
- })
- }
- // @Tags User
- // @Summary 设置用户权限
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.setUserAuthorities true "设置用户权限"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"修改成功"}"
- // @Router /user/setUserAuthorities [post]
- export const setUserAuthorities = (data) => {
- return service({
- url: '/user/setUserAuthorities',
- method: 'post',
- data: data
- })
- }
- // @Tags User
- // @Summary 获取用户信息
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /user/getUserInfo [get]
- export const getUserInfo = () => {
- return service({
- url: '/user/getUserInfo',
- method: 'get'
- })
- }
- export const resetPassword = (data) => {
- return service({
- url: '/user/resetPassword',
- method: 'post',
- data: data
- })
- }
|