menuApi.js
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {
GlAxios
} from 'glsx-vue-common'
const path = 'menu'
const __sAdd = `${path}/add`
const __sDel = `${path}/del`
const __sEdit = `${path}/edit`
const __sFindById = `${path}/findById`
const __sFindTree = `${path}/findTree`
const __sGetByUserId = `${path}/getByUserId`
const __sGetPName = `${path}/getPName`
const addMenu = {
p: [__sAdd],
req: params => GlAxios.post(__sAdd, params)
}
const delMenu = {
p: [__sDel],
req: params => GlAxios.post(__sDel, params)
}
const editMenu = {
p: [__sEdit],
req: params => GlAxios.post(__sEdit, params)
}
const findMenuById = {
p: [__sFindById],
req: params => GlAxios.get(__sFindById, { params })
}
const findMenuTree = {
p: [__sFindTree],
req: params => GlAxios.get(__sFindTree, { params })
}
const getMenuByUserId = {
p: [__sGetByUserId],
req: params => GlAxios.get(__sGetByUserId, { params })
}
const getMenuByPName = {
p: [__sGetPName],
req: params => GlAxios.get(__sGetPName, { params })
}
export {
addMenu,
delMenu,
editMenu,
findMenuById,
findMenuTree,
getMenuByUserId,
getMenuByPName
}