feat: 立减金模板新增固定时间和领取后时间展示

This commit is contained in:
wangsongsole 2023-08-04 11:40:11 +08:00
parent 2f1cbf6194
commit b3d55bbbda
3 changed files with 28 additions and 1 deletions

View File

@ -637,3 +637,9 @@
min-height: 200px;
}
}
.r-f {
margin: 5px 0;
font-size: 11px;
color: #a8a8a8;
}

View File

@ -7,6 +7,27 @@ export default ({ data }) => {
}, [data.ruleWeek])
function createElement() {
console.log(data)
if (data.usable_time === "received") {
return (
<div className="available_time">
<h3>可用时间</h3>
<p className="r-f">
领取后{data.effect_date_type.text},有效期 {data.effect_date}
</p>
</div>
)
}
if (data.usable_time === "fiexd") {
return (
<div className="available_time">
<h3>可用时间</h3>
<p className="r-f">
{data.fixed_time[0]} ~ {data.fixed_time[1]}
</p>
</div>
)
}
if (data.usable_time === "week") {
return (
<div className="available_time">

View File

@ -59,7 +59,7 @@ export default ({ data }) => {
<i className="right"></i>
</div>
<div className="illustrate">
{data.instruction || ["week", "irregular"].includes(data.usable_time) ? (
{data.instruction || data.usable_time ? (
<>
<TimeComponent data={data} />
<h3 className="illustrate-title">活动说明</h3>