- 后端:临时解决 Dubbo 内嵌在 Spring Boot 时,对本地的 Dubbo Service 引用报错的问题。

- 前端:完善商品推荐
- 前端:完善优惠劵
This commit is contained in:
YunaiV
2019-05-07 19:33:16 +08:00
parent ab5d051f75
commit d39a416080
69 changed files with 743 additions and 202 deletions

View File

@@ -6,6 +6,7 @@ import {
getCouponCardTemplatePage,
} from '../../services/promotion';
import PaginationHelper from '../../../helpers/PaginationHelper';
import {productSpuList, productSpuSearchList} from "../../services/product";
const SEARCH_PARAMS_DEFAULT = {
title: '',
@@ -26,6 +27,7 @@ export default {
modalType: undefined, // 'add' or 'update' 表单
formVals: {}, // 当前表单值
modalLoading: false,
searchProductSpuList: [],
},
effects: {
@@ -153,6 +155,33 @@ export default {
// }
// },
* searchProductSpu({ payload }, { call, put }) {
// 请求
const response = yield call(productSpuSearchList, payload);
// 响应
if (response.code === 0) {
yield put({
type: 'setAll',
payload: {
searchProductSpuList: response.data,
},
});
}
},
* getProductSpuList({ payload }, { call, put }) {
// 请求
const response = yield call(productSpuList, payload);
// 响应
if (response.code === 0) {
yield put({
type: 'setAll',
payload: {
formSpuValues: response.data,
},
});
}
}
},
reducers: {

View File

@@ -7,6 +7,7 @@ import {
updateProductRecommendStatus,
} from '../../services/promotion';
import PaginationHelper from '../../../helpers/PaginationHelper';
import {productSpuList, productSpuSearchList} from "../../services/product";
const SEARCH_PARAMS_DEFAULT = {
type: undefined,
@@ -27,6 +28,8 @@ export default {
modalType: undefined, // 'add' or 'update' 表单
formVals: {}, // 当前表单值
modalLoading: false,
searchProductSpuList: [], // 搜索商品
formSpuValues: [], // 编辑时,如果优惠劵选择的是商品,则需要获取该值。
},
effects: {
@@ -151,6 +154,19 @@ export default {
}
},
* searchProductSpu({ payload }, { call, put }) {
// 请求
const response = yield call(productSpuSearchList, payload);
// 响应
if (response.code === 0) {
yield put({
type: 'setAll',
payload: {
searchProductSpuList: response.data,
},
});
}
},
},
reducers: {