123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- import service from '@/utils/request'
- // @Tags api
- // @Summary 分页获取角色列表
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body modelInterface.PageInfo true "分页获取用户列表"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /api/getApiList [post]
- // {
- // page int
- // pageSize int
- // }
- export const getApiList = (data) => {
- return service({
- url: '/api/getApiList',
- method: 'post',
- data
- })
- }
- // @Tags Api
- // @Summary 创建基础api
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.CreateApiParams true "创建api"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /api/createApi [post]
- export const createApi = (data) => {
- return service({
- url: '/api/createApi',
- method: 'post',
- data
- })
- }
- // @Tags menu
- // @Summary 根据id获取菜单
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.GetById true "根据id获取菜单"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /menu/getApiById [post]
- export const getApiById = (data) => {
- return service({
- url: '/api/getApiById',
- method: 'post',
- data
- })
- }
- // @Tags Api
- // @Summary 更新api
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.CreateApiParams true "更新api"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
- // @Router /api/updateApi [post]
- export const updateApi = (data) => {
- return service({
- url: '/api/updateApi',
- method: 'post',
- data
- })
- }
- // @Tags Api
- // @Summary 更新api
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body api.CreateApiParams true "更新api"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
- // @Router /api/setAuthApi [post]
- export const setAuthApi = (data) => {
- return service({
- url: '/api/setAuthApi',
- method: 'post',
- data
- })
- }
- // @Tags Api
- // @Summary 获取所有的Api 不分页
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /api/getAllApis [post]
- export const getAllApis = (data) => {
- return service({
- url: '/api/getAllApis',
- method: 'post',
- data
- })
- }
- // @Tags Api
- // @Summary 删除指定api
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body dbModel.Api true "删除api"
- // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
- // @Router /api/deleteApi [post]
- export const deleteApi = (data) => {
- return service({
- url: '/api/deleteApi',
- method: 'post',
- data
- })
- }
- // @Tags SysApi
- // @Summary 删除选中Api
- // @Security ApiKeyAuth
- // @accept application/json
- // @Produce application/json
- // @Param data body request.IdsReq true "ID"
- // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
- // @Router /api/deleteApisByIds [delete]
- export const deleteApisByIds = (data) => {
- return service({
- url: '/api/deleteApisByIds',
- method: 'delete',
- data
- })
- }
|