diff --git a/src/components/knockGold/index.less b/src/components/knockGold/index.less index c6baa80a..4f484d03 100644 --- a/src/components/knockGold/index.less +++ b/src/components/knockGold/index.less @@ -32,11 +32,22 @@ } .timeList { + display: grid; + grid-template-columns: repeat(3, 33.33%); + text-align: center; + li { margin: 3px 0; font-size: 12px; color: #a8a8a8; } + + } + + .flex { + display: grid; + grid-template-columns: repeat(2, 50%); + } } diff --git a/src/components/knockGold/mobileCmponent.jsx b/src/components/knockGold/mobileCmponent.jsx index 4885049b..dacd7265 100644 --- a/src/components/knockGold/mobileCmponent.jsx +++ b/src/components/knockGold/mobileCmponent.jsx @@ -2,7 +2,7 @@ * @Author: Wind * @Date: 2022-06-06 14:53:58 * @LastEditors: Wind - * @LastEditTime: 2022-08-12 17:41:52 + * @LastEditTime: 2022-08-15 10:23:22 * @Description: * @FilePath: \frontend\src\components\knockGold\mobileCmponent.jsx */ @@ -17,6 +17,56 @@ export default ({ data }) => { setNewWeek(sortWeeks(data.ruleWeek)) }, [data.ruleWeek]) + function createElement(type) { + { + /* irregularDate: [[]], //不规则日期 + irregularTime: [[]], //不规则时间 */ + } + if (data.usable_time === 'week') { + return ( +
+

可用时间

+ +
+ ) + } else if (data.usable_time === 'irregular') { + return ( +
+

可用时间

+ +
+ ) + } + } + return (
@@ -54,22 +104,7 @@ export default ({ data }) => {

- {data.batch_goods_name ? data.batch_goods_name : 'xxx'}兑换说明 -

- - {data.usable_time === 'week' ? ( -
-

可用时间

-
    - {newWeek?.map((item) => ( -
  • - {`${item}: - ${data.ruleDate.map((item1) => { - if (item1[1]) return `${item1[0]}~${item1[1]}` - })}`} -
  • - ))} -
-
- ) : null} + {createElement()} {data.instruction ? ( <>