forked from geeeeeeeek/python_shop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment.js
More file actions
61 lines (57 loc) · 1012 Bytes
/
comment.js
File metadata and controls
61 lines (57 loc) · 1012 Bytes
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
58
59
60
61
/**
* api
*/
import axios from '@/utils/request.js'
const api = {
listApi: '/myapp/admin/comment/list',
createApi: '/myapp/admin/comment/create',
deleteApi: '/myapp/admin/comment/delete',
updateApi: '/myapp/admin/comment/update'
}
/**
* 列表
*/
export const listApi = function (data) {
return axios({
url: api.listApi,
method: 'get',
params: data
})
}
/**
* 新建
*/
export const createApi = function (data) {
return axios({
url: api.createApi,
method: 'post',
headers: {
'Content-Type': 'multipart/form-data;charset=utf-8'
},
data: data
})
}
/**
* 删除
*/
export const deleteApi = function (params) {
return axios({
url: api.deleteApi,
method: 'post',
params: params
})
}
/**
* 更新
*/
export const updateApi = function (params, data) {
return axios({
url: api.updateApi,
method: 'post',
headers: {
'Content-Type': 'multipart/form-data;charset=utf-8'
},
params: params,
data: data
})
}