✨ feat: 立减金新增使用须知
This commit is contained in:
parent
d653657ad1
commit
7df4a9b798
|
@ -59,6 +59,14 @@ const initArray = (targetNum) => {
|
|||
return Array.from({ length: targetNum }, (_, index) => index)
|
||||
}
|
||||
|
||||
const noticeWX = `
|
||||
1、在微信APP内打开链接,点击【一键领取】完成领取微信立减金<br />
|
||||
2、微信立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人`
|
||||
|
||||
const noticeZFB = `
|
||||
1、在支付宝H5内打开链接,点击【一键领取】完成领取支付宝立减金<br />
|
||||
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 {
|
|||
{/* <h5>样式设置</h5> */}
|
||||
<Card style={{ width: "70%", margin: "10px 0" }} title={"样式设置"}>
|
||||
<Form ref="form3">
|
||||
{this.state.model.channel == 2 ||
|
||||
(this.state.model.channel == 1 && this.state.model.receive_mode == 1) ? (
|
||||
<FormItem id="instructionNotice" labelname="使用须知" required="">
|
||||
<WangEditor
|
||||
pageType="detaileditor1"
|
||||
setEdittext={(text) => {
|
||||
this.onHandleChange(text, "instructionNotice")
|
||||
}}
|
||||
height={125}
|
||||
width="520px"
|
||||
text={this.state.model.instructionNotice}
|
||||
limitLength={200}
|
||||
key={this.state.model.channel + 1}
|
||||
/>
|
||||
</FormItem>
|
||||
) : null}
|
||||
<FormItem id="instruction" labelname="使用说明" required="">
|
||||
<WangEditor
|
||||
pageType="detaileditor"
|
||||
setEdittext={(text) => {
|
||||
this.onHandleChange(text, "instruction")
|
||||
}}
|
||||
height={200}
|
||||
width="520px"
|
||||
text={this.state.model.instruction}
|
||||
limitLength={5000}
|
||||
|
|
|
@ -56,14 +56,11 @@ export default ({ data }) => {
|
|||
<>
|
||||
<div className="content">
|
||||
<h3>使用须知</h3>
|
||||
<p>
|
||||
1、在{data.channel === "1" ? "支付宝" : "微信"}
|
||||
APP内打开链接,点击【一键领取】完成领取
|
||||
{data.channel === "1" ? "支付宝" : "微信"}立减金
|
||||
<br />
|
||||
2、{data.channel === "1" ? "支付宝" : "微信"}
|
||||
里立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人
|
||||
</p>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: data.instructionNotice
|
||||
}}
|
||||
></p>
|
||||
</div>
|
||||
<div className="content">
|
||||
<h3>使用规则</h3>
|
||||
|
|
|
@ -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 (
|
||||
<div className="countBox_par">
|
||||
<div id="wangeditorDom" style={{ width: this.props.width }}></div>
|
||||
<div id={this.props.pageType} style={{ width: this.props.width }}></div>
|
||||
<p className="countBox">{this.state.count + "/" + this.props.limitLength}</p>
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue