diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 1dbeb33f..07d5709c 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -542,10 +542,20 @@ export default class acclist extends React.Component { this.setState({ rank: null }); this.setState({ rankoptions: [] }); this.setState({ drawerVisible: true }); + if (this.state.keyType === 2) { + setTimeout(() => { + this.refs.addEditCouponEl.clearCouponForm(); + }); + } sessionStorage.setItem("productData", ""); sessionStorage.setItem("knockGoldData", ""); } closeDraw() { + if (this.state.keyType === 2) { + setTimeout(() => { + this.refs.addEditCouponEl.clearCouponForm(); + }); + } this.setState({ drawerVisible: false }); } addProduct(type) { diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index af9beefe..6eb7ea2c 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -434,10 +434,20 @@ export default class acclist extends React.Component { this.setState({ rank: null }); this.setState({ rankoptions: [] }); this.setState({ drawerVisible: true }); + if (this.state.keyType === 2) { + setTimeout(() => { + this.refs.addEditCouponEl.clearCouponForm(); + }); + } sessionStorage.setItem("productData", ""); sessionStorage.setItem("knockGoldData", ""); } closeDraw() { + if (this.state.keyType === 2) { + setTimeout(() => { + this.refs.addEditCouponEl.clearCouponForm(); + }); + } this.setState({ drawerVisible: false }); } addProduct(type) {