|
@@ -85,17 +85,17 @@ export default class MerchantProductCreate extends PureComponent {
|
|
|
handleModalOk = (data) => {
|
|
|
const { curClickedBtn } = this.state;
|
|
|
const { dispatch } = this.props;
|
|
|
- if (curClickedBtn === Codes.CODE_COURSE) {
|
|
|
+ if (curClickedBtn == Codes.CODE_COURSE) {
|
|
|
this.setState({
|
|
|
selectItem: data,
|
|
|
courseModalVisible: false,
|
|
|
});
|
|
|
- } else if(curClickedBtn === Codes.CODE_SUPPORT) {
|
|
|
+ } else if(curClickedBtn == Codes.CODE_SUPPORT) {
|
|
|
this.setState({
|
|
|
selectItem: data,
|
|
|
supportModalVisible: false,
|
|
|
});
|
|
|
- } else if (curClickedBtn === Codes.CODE_PACKAGE) {
|
|
|
+ } else if (curClickedBtn == Codes.CODE_PACKAGE) {
|
|
|
this.setState({
|
|
|
selectItem: data,
|
|
|
packageModalVisible: false,
|
|
@@ -106,18 +106,18 @@ export default class MerchantProductCreate extends PureComponent {
|
|
|
handleModalCancel = () => {
|
|
|
const { curClickedBtn } = this.state;
|
|
|
const { dispatch } = this.props;
|
|
|
- if (curClickedBtn === Codes.CODE_COURSE) {
|
|
|
+ if (curClickedBtn == Codes.CODE_COURSE) {
|
|
|
this.setState({ courseModalVisible: false });
|
|
|
- } else if (curClickedBtn === Codes.CODE_SUPPORT) {
|
|
|
+ } else if (curClickedBtn == Codes.CODE_SUPPORT) {
|
|
|
this.setState({ supportModalVisible: false });
|
|
|
- } else if (curClickedBtn === Codes.CODE_PACKAGE) {
|
|
|
+ } else if (curClickedBtn == Codes.CODE_PACKAGE) {
|
|
|
this.setState({ packageModalVisible: false });
|
|
|
}
|
|
|
}
|
|
|
|
|
|
handleModalShow = (name) => {
|
|
|
const { dispatch } = this.props;
|
|
|
- if (name === Codes.CODE_COURSE) {
|
|
|
+ if (name == Codes.CODE_COURSE) {
|
|
|
this.setState({
|
|
|
curClickedBtn: name,
|
|
|
courseModalVisible: true,
|
|
@@ -130,7 +130,7 @@ export default class MerchantProductCreate extends PureComponent {
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
- } else if (name === Codes.CODE_SUPPORT) {
|
|
|
+ } else if (name == Codes.CODE_SUPPORT) {
|
|
|
this.setState({
|
|
|
curClickedBtn: name,
|
|
|
supportModalVisible: true,
|
|
@@ -143,7 +143,7 @@ export default class MerchantProductCreate extends PureComponent {
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
- } else if (name === Codes.CODE_PACKAGE) {
|
|
|
+ } else if (name == Codes.CODE_PACKAGE) {
|
|
|
this.setState({
|
|
|
curClickedBtn: name,
|
|
|
packageModalVisible: true,
|
|
@@ -180,11 +180,11 @@ export default class MerchantProductCreate extends PureComponent {
|
|
|
|
|
|
const data = { ...newFilters, ...tableFilters, pageNo: pagination.current, pageSize: pagination.pageSize };
|
|
|
Object.keys(data).map(key => data[key] ? null : delete data[key]);
|
|
|
- if (curClickedBtn === Codes.CODE_COURSE) {
|
|
|
+ if (curClickedBtn == Codes.CODE_COURSE) {
|
|
|
dispatch({ type: 'course/query', payload: { ...data } });
|
|
|
- } else if (curClickedBtn === Codes.CODE_SUPPORT) {
|
|
|
+ } else if (curClickedBtn == Codes.CODE_SUPPORT) {
|
|
|
dispatch({ type: 'support/query', payload: { ...data } });
|
|
|
- } else if (curClickedBtn === Codes.CODE_PACKAGE) {
|
|
|
+ } else if (curClickedBtn == Codes.CODE_PACKAGE) {
|
|
|
dispatch({ type: 'combo/query', payload: { ...data } });
|
|
|
}
|
|
|
}
|