77 * @LastEditTime : 2021-04-21 23:00:11
88 */
99import service from '@/utils/request'
10- import { IResponse , IStatusParams } from '@/api/index.type '
11- import { IMenu , IMenuParams , IMenuSelect } from './index.type '
10+ import { Axios } from '@/types/axios '
11+ import { Menu } from '@/types/menu '
1212
1313/**
1414 * @description : 获取权限菜单
1515 * @param {* }
1616 * @return {* }
1717 * @author : gumingchen
1818 */
19- export function getList ( params : { parent_id : number } ) : Promise < IResponse < IMenu [ ] > > {
19+ export function getList ( params : { parent_id : number } ) : Promise < Axios . Response < Menu . Vo [ ] > > {
2020 return service ( {
2121 url : '/base/menu/list' ,
2222 method : 'get' ,
@@ -30,7 +30,7 @@ export function getList(params: { parent_id: number }): Promise<IResponse<IMenu[
3030 * @return {* }
3131 * @author : gumingchen
3232 */
33- export function info ( params : number ) : Promise < IResponse < IMenuParams > > {
33+ export function info ( params : number ) : Promise < Axios . Response < Menu . Dto > > {
3434 return service ( {
3535 url : `/base/menu/info/${ params } ` ,
3636 method : 'get'
@@ -43,7 +43,7 @@ export function info(params: number): Promise<IResponse<IMenuParams>> {
4343 * @return {* }
4444 * @author : gumingchen
4545 */
46- export function add ( params : IMenuParams ) : Promise < IResponse < null > > {
46+ export function add ( params : Menu . Base ) : Promise < Axios . Response < null > > {
4747 return service ( {
4848 url : '/base/menu/create' ,
4949 method : 'post' ,
@@ -57,7 +57,7 @@ export function add(params: IMenuParams): Promise<IResponse<null>> {
5757 * @return {* }
5858 * @author : gumingchen
5959 */
60- export function edit ( params : IMenuParams ) : Promise < IResponse < null > > {
60+ export function edit ( params : Menu . Base ) : Promise < Axios . Response < null > > {
6161 return service ( {
6262 url : '/base/menu/update' ,
6363 method : 'post' ,
@@ -71,7 +71,7 @@ export function edit(params: IMenuParams): Promise<IResponse<null>> {
7171 * @return {* }
7272 * @author : gumingchen
7373 */
74- export function del ( params : { id : number } ) : Promise < IResponse < null > > {
74+ export function del ( params : { id : number } ) : Promise < Axios . Response < null > > {
7575 return service ( {
7676 url : '/base/menu/delete' ,
7777 method : 'post' ,
@@ -85,7 +85,7 @@ export function del(params: { id: number }): Promise<IResponse<null>> {
8585 * @return {* }
8686 * @author : gumingchen
8787 */
88- export function setDisplay ( params : IStatusParams ) : Promise < IResponse < null > > {
88+ export function setDisplay ( params : Axios . StatusParams ) : Promise < Axios . Response < null > > {
8989 return service ( {
9090 url : '/base/menu/display' ,
9191 method : 'post' ,
@@ -99,7 +99,7 @@ export function setDisplay(params: IStatusParams): Promise<IResponse<null>> {
9999 * @return {* }
100100 * @author : gumingchen
101101 */
102- export function setAlive ( params : IStatusParams ) : Promise < IResponse < null > > {
102+ export function setAlive ( params : Axios . StatusParams ) : Promise < Axios . Response < null > > {
103103 return service ( {
104104 url : '/base/menu/alive' ,
105105 method : 'post' ,
@@ -113,7 +113,7 @@ export function setAlive(params: IStatusParams): Promise<IResponse<null>> {
113113 * @return {* }
114114 * @author : gumingchen
115115 */
116- export function setTab ( params : IStatusParams ) : Promise < IResponse < null > > {
116+ export function setTab ( params : Axios . StatusParams ) : Promise < Axios . Response < null > > {
117117 return service ( {
118118 url : '/base/menu/tab' ,
119119 method : 'post' ,
@@ -127,7 +127,7 @@ export function setTab(params: IStatusParams): Promise<IResponse<null>> {
127127 * @return {* }
128128 * @author : gumingchen
129129 */
130- export function setMultiple ( params : IStatusParams ) : Promise < IResponse < null > > {
130+ export function setMultiple ( params : Axios . StatusParams ) : Promise < Axios . Response < null > > {
131131 return service ( {
132132 url : '/base/menu/multiple' ,
133133 method : 'post' ,
@@ -141,20 +141,20 @@ export function setMultiple(params: IStatusParams): Promise<IResponse<null>> {
141141 * @return {* }
142142 * @author : gumingchen
143143 */
144- export function select ( ) : Promise < IResponse < IMenuSelect [ ] > > {
144+ export function select ( ) : Promise < Axios . Response < Menu . Simple [ ] > > {
145145 return service ( {
146146 url : '/base/menu/select' ,
147147 method : 'get'
148148 } )
149149}
150150
151151/**
152- * @description : 下拉列表
152+ * @description : 当前用户下拉列表
153153 * @param {* }
154154 * @return {* }
155155 * @author : gumingchen
156156 */
157- export function selfSelect ( ) : Promise < IResponse < IMenuSelect [ ] > > {
157+ export function selfSelect ( ) : Promise < Axios . Response < Menu . Simple [ ] > > {
158158 return service ( {
159159 url : '/base/menu/self/select' ,
160160 method : 'get'
0 commit comments