feat: 编辑云闪付立减金代码

This commit is contained in:
wangsongsole 2023-07-24 17:18:04 +08:00
parent 45e7708e35
commit 6a60bacc91
4 changed files with 16 additions and 14 deletions

View File

@ -753,13 +753,15 @@ export default class addKnockGold extends Component {
this.onHandleChange(defaultInstructionZfb, "instruction")
} else if (target.value == 2) {
this.onHandleChange(defaultInstructionWx, "instruction")
} else {
this.onHandleChange("", "instruction")
}
}}
value={this.state.model.channel}
>
<RadioButton value={"1"}>支付宝</RadioButton>
<RadioButton value={"3"}>云闪付</RadioButton>
<RadioButton value={"2"}>微信</RadioButton>
<RadioButton value={"3"}>云闪付</RadioButton>
</RadioGroup>
</FormItem>
<FormItem labelname="立减金平台批次号" prop="channel_activity_id" id="batch_number">

View File

@ -135,11 +135,9 @@
}
.coupon-right .validity {
width: 280px;
transform: scale(0.85);
font-size: 8px;
font-size: 10px;
color: #cc9590;
margin: 2px 0 2px -22px;
margin-top: 2px;
}
.receiveBtn {

View File

@ -1,19 +1,20 @@
import { useEffect, useState } from "react"
import { sortWeeks } from "@/tools/utils.js"
export default (data) => {
export default ({ data }) => {
const [newWeek, setNewWeek] = useState([])
useEffect(() => {
setNewWeek(sortWeeks(data.ruleWeek))
}, [data.ruleWeek])
function createElement() {
console.log(data.usable_time)
if (data.usable_time === "week") {
return (
<div className="available_time">
<h3>可用时间</h3>
<ul className="timeList">
{newWeek?.map((item) => (
<li>
{newWeek?.map((item, index) => (
<li key={index}>
{item}
{data.ruleDate.map((item1) => {
if (item1[1])
@ -33,13 +34,13 @@ export default (data) => {
<div className="available_time">
<h3>可用时间</h3>
<ul className="timeList flex">
{data.irregularDate?.map((item) => (
<li>
{data.irregularDate?.map((item, index) => (
<li key={index}>
{item.join(" 至 ")}
{data.irregularTime.map((item1) => {
{data.irregularTime.map((item1, index1) => {
if (item1[1])
return (
<p style={{ marginTop: "5px" }}>
<p key={index1} style={{ marginTop: "5px" }}>
{item1[0]}~{item1[1]}
</p>
)
@ -50,6 +51,7 @@ export default (data) => {
</div>
)
}
return <></>
}
return createElement
return createElement()
}

View File

@ -529,8 +529,8 @@ export default class addKnockGold extends Component {
value={this.state.model.channel}
>
<RadioButton value={1}>支付宝</RadioButton>
<RadioButton value={3}>云闪付</RadioButton>
<RadioButton value={2}>微信</RadioButton>
<RadioButton value={3}>云闪付</RadioButton>
</RadioGroup>
</FormItem>
<FormItem labelname="红包类型" prop="cash_amount_type" id="type">