resource-api.js
1.23 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
58
59
import Api from './api';
class ResourceApi extends Api {
constructor() {
super();
}
list(params) {
return this._post('/ufoPlatform/resource/getResources', params);
}
info(id) {
return this._post('/ufoPlatform/resource/getResourceInfo', {
id,
});
}
getResourceListByCode(code) {
return this._get('/ufoPlatform/resource/getResourcesByCode', {
code
})
}
updateResourceTime(data) {
return this._post('/ufoPlatform/resource/editOrUpdateResourcesTime', data);
}
editResource(data) {
return this._post('/ufoPlatform/resource/editResourceContentData', data);
}
editGoodsPool(data) {
return this._post(
'/ufoPlatform/resource/batchEditResourceGoodsPool',
data,
true,
);
}
addResourceListItem(data) {
// 添加资源位列表中的数据
return this._post('/ufoPlatform/resource/addOrUpdateResource', data);
}
editResourceListItem(data) {
// 编辑资源位列表中的某条数据
return this._post('/ufoPlatform/resource/addOrUpdateResource', data);
}
addOrUpdateResourceDetail(data) {
return this._post(
'/ufoPlatform/resource/addOrUpdateResourceDeatil',
data,
true,
);
}
}
export default ResourceApi;