fix: 修改商品分组编辑时间的问题

This commit is contained in:
duan
2025-04-15 14:26:35 +08:00
parent 784941f558
commit d675341444
2 changed files with 11 additions and 4 deletions

View File

@@ -253,7 +253,8 @@ async function addConfirm() {
})
obj.productIds = arr
}
if (obj.time.length) {
console.log(obj, '商品分组的参数')
if (obj.time && obj.time.length) {
obj.saleStartTime = obj.time[0]
obj.saleEndTime = obj.time[1]
}
@@ -264,6 +265,10 @@ async function addConfirm() {
myDialogRefAdd.value.close()
}
} else {
if (obj.useTime == 0) {
obj.saleStartTime = null
obj.saleEndTime = null
}
let res = await UserAPI.update(obj)
if (res.code == 200) {
ElMessage.success("编辑成功");