动态路由大体实现
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import service from '@/utils/request'
|
||||
|
||||
// @Summary 用户登录
|
||||
// @Produce application/json
|
||||
// @Param 可以什么都不填 调一下即可
|
||||
// @Router /menu/getMenu [post]
|
||||
export const asyncMenu = () => {
|
||||
return service({
|
||||
url: "/menu/getMenu",
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
@@ -2,12 +2,24 @@ import service from '@/utils/request'
|
||||
|
||||
// @Summary 用户登录
|
||||
// @Produce application/json
|
||||
// @Param data body {userName:"string",passWord:"string"}
|
||||
// @Param data body {username:"string",password:"string"}
|
||||
// @Router /base/login [post]
|
||||
export const login = (data) => {
|
||||
service({
|
||||
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
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user