From 6a60bacc912078b5fe4f04212d681f253da87edd Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Mon, 24 Jul 2023 17:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E7=BC=96=E8=BE=91=E4=BA=91?= =?UTF-8?q?=E9=97=AA=E4=BB=98=E7=AB=8B=E5=87=8F=E9=87=91=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/knockGold/index.jsx | 4 +++- src/components/knockGold/index.less | 6 ++---- src/components/knockGold/timeComponent.jsx | 18 ++++++++++-------- src/components/redPackets/index.jsx | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/components/knockGold/index.jsx b/src/components/knockGold/index.jsx index dc77bde2..cc4352b3 100644 --- a/src/components/knockGold/index.jsx +++ b/src/components/knockGold/index.jsx @@ -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} > 支付宝 - 云闪付 微信 + 云闪付 diff --git a/src/components/knockGold/index.less b/src/components/knockGold/index.less index a4669944..d479e203 100644 --- a/src/components/knockGold/index.less +++ b/src/components/knockGold/index.less @@ -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 { diff --git a/src/components/knockGold/timeComponent.jsx b/src/components/knockGold/timeComponent.jsx index 398c3520..7a160c06 100644 --- a/src/components/knockGold/timeComponent.jsx +++ b/src/components/knockGold/timeComponent.jsx @@ -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 (

可用时间

    - {newWeek?.map((item) => ( -
  • + {newWeek?.map((item, index) => ( +
  • {item} {data.ruleDate.map((item1) => { if (item1[1]) @@ -33,13 +34,13 @@ export default (data) => {

    可用时间

      - {data.irregularDate?.map((item) => ( -
    • + {data.irregularDate?.map((item, index) => ( +
    • {item.join(" 至 ")} - {data.irregularTime.map((item1) => { + {data.irregularTime.map((item1, index1) => { if (item1[1]) return ( -

      +

      {item1[0]}~{item1[1]}

      ) @@ -50,6 +51,7 @@ export default (data) => {
    ) } + return <> } - return createElement + return createElement() } diff --git a/src/components/redPackets/index.jsx b/src/components/redPackets/index.jsx index 8f9c519d..fe29d8b4 100644 --- a/src/components/redPackets/index.jsx +++ b/src/components/redPackets/index.jsx @@ -529,8 +529,8 @@ export default class addKnockGold extends Component { value={this.state.model.channel} > 支付宝 - 云闪付 微信 + 云闪付