后端 + 前端:优惠劵更新功能
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import {message} from 'antd';
|
||||
import {
|
||||
deleteProductRecommend,
|
||||
updateProductRecommend,
|
||||
updateProductRecommendStatus,
|
||||
addCouponCardTemplate,
|
||||
updateCouponCardTemplate,
|
||||
getCouponCardTemplatePage,
|
||||
} from '../../services/promotion';
|
||||
import PaginationHelper from '../../../helpers/PaginationHelper';
|
||||
|
||||
const SEARCH_PARAMS_DEFAULT = {
|
||||
// type: 1,
|
||||
title: '',
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -50,7 +49,7 @@ export default {
|
||||
list: response.data.list,
|
||||
pagination: PaginationHelper.formatPagination(response.data, payload),
|
||||
searchParams: {
|
||||
// type: payload.type
|
||||
title: payload.title
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -100,7 +99,7 @@ export default {
|
||||
});
|
||||
|
||||
// 请求
|
||||
const response = yield call(updateProductRecommend, body);
|
||||
const response = yield call(updateCouponCardTemplate, body);
|
||||
// 响应
|
||||
if (response.code === 0) {
|
||||
if (callback) {
|
||||
@@ -138,21 +137,21 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
* delete({ payload }, { call, put }) {
|
||||
// 请求
|
||||
const response = yield call(deleteProductRecommend, payload);
|
||||
// 响应
|
||||
if (response.code === 0) {
|
||||
message.info('删除成功!');
|
||||
// 刷新列表
|
||||
yield put({
|
||||
type: 'query',
|
||||
payload: {
|
||||
...PaginationHelper.defaultPayload
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
// * delete({ payload }, { call, put }) {
|
||||
// // 请求
|
||||
// const response = yield call(deleteProductRecommend, payload);
|
||||
// // 响应
|
||||
// if (response.code === 0) {
|
||||
// message.info('删除成功!');
|
||||
// // 刷新列表
|
||||
// yield put({
|
||||
// type: 'query',
|
||||
// payload: {
|
||||
// ...PaginationHelper.defaultPayload
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user