diff --git a/src/components/knockGold/index.jsx b/src/components/knockGold/index.jsx index 4fcfaed0..d1854534 100644 --- a/src/components/knockGold/index.jsx +++ b/src/components/knockGold/index.jsx @@ -59,6 +59,14 @@ const initArray = (targetNum) => { return Array.from({ length: targetNum }, (_, index) => index) } +const noticeWX = ` +1、在微信APP内打开链接,点击【一键领取】完成领取微信立减金
+2、微信立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人` + +const noticeZFB = ` +1、在支付宝H5内打开链接,点击【一键领取】完成领取支付宝立减金
+2、支付宝立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人` + export default class addKnockGold extends Component { constructor(props) { super(props) @@ -98,7 +106,8 @@ export default class addKnockGold extends Component { provider: "lsxd", //主体名称 receive_mode: 1, is_webview: 0, - timer_show: 1 + timer_show: 1, + instructionNotice: noticeZFB }, subjectList: [], TimeDiffer: "", @@ -131,6 +140,7 @@ export default class addKnockGold extends Component { model.entry_time[1] = this.props.data.time_limit.effect_time.end_time model.timer_show = Number(this.props.data.time_limit.timer_show) || 1 model.instruction = this.props.data.instruction + model.instructionNotice = this.props.data.instructionNotice model.fixed_time[0] = this.props.data.time_limit.use_time.fiexd_time?.start_time model.fixed_time[1] = this.props.data.time_limit.use_time.fiexd_time?.end_time @@ -501,6 +511,7 @@ export default class addKnockGold extends Component { transformData.natural_limit = this.state.model.natural_limit transformData.brush_limit = this.state.model.brush_limit transformData.instruction = this.state.model.instruction + transformData.instructionNotice = this.state.model.instructionNotice transformData.early_per = this.state.model.early_per.filter((item) => item) transformData.early_notifier = this.state.model.early_notifier.map(({ text, key }) => ({ real_name: text, @@ -786,7 +797,11 @@ export default class addKnockGold extends Component { this.onHandleChange(value, "channel") if (value == 1) { this.onHandleChange(defaultInstructionZfb, "instruction") + if (this.state.model.receive_mode == 1) { + this.onHandleChange(noticeZFB, "instructionNotice") + } } else if (value == 2) { + this.onHandleChange(noticeWX, "instructionNotice") this.onHandleChange(defaultInstructionWx, "instruction") } else { this.onHandleChange(defaultInstructionYsf, "instruction") @@ -1595,12 +1610,29 @@ export default class addKnockGold extends Component { {/*
样式设置
*/}
+ {this.state.model.channel == 2 || + (this.state.model.channel == 1 && this.state.model.receive_mode == 1) ? ( + + { + this.onHandleChange(text, "instructionNotice") + }} + height={125} + width="520px" + text={this.state.model.instructionNotice} + limitLength={200} + key={this.state.model.channel + 1} + /> + + ) : null} { this.onHandleChange(text, "instruction") }} + height={200} width="520px" text={this.state.model.instruction} limitLength={5000} diff --git a/src/components/knockGold/mobileComponent.jsx b/src/components/knockGold/mobileComponent.jsx index 64e9dfad..eb0bedc7 100644 --- a/src/components/knockGold/mobileComponent.jsx +++ b/src/components/knockGold/mobileComponent.jsx @@ -56,14 +56,11 @@ export default ({ data }) => { <>

使用须知

-

- 1、在{data.channel === "1" ? "支付宝" : "微信"} - APP内打开链接,点击【一键领取】完成领取 - {data.channel === "1" ? "支付宝" : "微信"}立减金 -
- 2、{data.channel === "1" ? "支付宝" : "微信"} - 里立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人 -

+

使用规则

diff --git a/src/components/knockGold/wangEditor.jsx b/src/components/knockGold/wangEditor.jsx index 43fde914..cbb11f70 100644 --- a/src/components/knockGold/wangEditor.jsx +++ b/src/components/knockGold/wangEditor.jsx @@ -11,12 +11,12 @@ export default class wangEditor extends React.Component { } componentDidMount() { let self = this - const editor = new Editor("#wangeditorDom") + const editor = new Editor(`#${this.props.pageType}`) this.setState({ editor }) editor.config.colors = ["#696969", "#9093a2", "#fgddbb", "#e3e7eb"] editor.config.pasteText = true // 设置编辑区域高度为 500px - editor.config.height = 200 + editor.config.height = this.props.height editor.config.showFullScreen = false editor.config.menus = ["bold", "foreColor", "italic", "indent", "link", "justify"] @@ -51,7 +51,7 @@ export default class wangEditor extends React.Component { render() { return (
-
+

{this.state.count + "/" + this.props.limitLength}

)