💪 optimize: 优化代码

This commit is contained in:
wangsongsole 2024-02-24 19:17:08 +08:00
parent e60e189ac6
commit 5e80c71cd4
2 changed files with 36 additions and 28 deletions

View File

@ -196,20 +196,24 @@ const Combining = forwardRef((props, ref) => {
receive_mode, receive_mode,
instruction, instruction,
timer_type: time_limit.receive_time.start_time ? 2 : 1, timer_type: time_limit.receive_time.start_time ? 2 : 1,
group_cover: [ group_cover: group_cover
{ ? [
id: new Date().getTime(), {
src: group_cover, id: new Date().getTime(),
name: "商品展示" src: group_cover,
} name: "商品展示"
], }
group_image: [ ]
{ : [],
id: new Date().getTime(), group_image: group_image
src: group_image, ? [
name: "商品描述" {
} id: new Date().getTime(),
], src: group_image,
name: "商品描述"
}
]
: [],
timer: [time_limit.receive_time.start_time, time_limit.receive_time.end_time] timer: [time_limit.receive_time.start_time, time_limit.receive_time.end_time]
}) })
sessionStorage.setItem("knockGoldData", JSON.stringify(propsData.product.reduce)) sessionStorage.setItem("knockGoldData", JSON.stringify(propsData.product.reduce))

View File

@ -144,20 +144,24 @@ export default class combiningAdd extends React.Component {
restrict: reqCopy.restrict, restrict: reqCopy.restrict,
instruction, instruction,
date_time: [reqCopy.begin_time, reqCopy.end_time], date_time: [reqCopy.begin_time, reqCopy.end_time],
group_cover: [ group_cover: group_cover
{ ? [
id: new Date().getTime(), {
src: group_cover, id: new Date().getTime(),
name: "商品展示" src: group_cover,
} name: "商品展示"
], }
group_image: [ ]
{ : [],
id: new Date().getTime(), group_image: group_image
src: group_image, ? [
name: "商品描述" {
} id: new Date().getTime(),
], src: group_image,
name: "商品描述"
}
]
: [],
timer: time_limit.receive_time.start_time timer: time_limit.receive_time.start_time
? [time_limit.receive_time.start_time, time_limit.receive_time.end_time] ? [time_limit.receive_time.start_time, time_limit.receive_time.end_time]
: [], : [],