|
@@ -1,10 +1,15 @@
|
|
|
import api from '@/utils/request';
|
|
|
|
|
|
-export const getList = params =>
|
|
|
+export const getPage = params =>
|
|
|
api.post(`/yxl-back-end/framework/help/content/page`, params);
|
|
|
export const getItem = ({ id, ...params }) =>
|
|
|
api.get(`/yxl-back-end/framework/help/content/${id}`, params);
|
|
|
-export const saveItem = params =>
|
|
|
- api.post(`/yxl-back-end/framework/help/content/save`, params);
|
|
|
+export const saveItem = ({ id, ...params }) => {
|
|
|
+ if (id) {
|
|
|
+ return api.put(`/yxl-back-end/framework/help/content/${id}`, params);
|
|
|
+ } else {
|
|
|
+ return api.post(`/yxl-back-end/framework/help/content`, params);
|
|
|
+ }
|
|
|
+};
|
|
|
export const delItem = ({ id, ...params }) =>
|
|
|
api.del(`/yxl-back-end/framework/help/content/${id}`, params);
|