bugfix: productList

This commit is contained in:
2026-04-29 15:07:43 +08:00
parent 5d184bf1f9
commit 2dc98e5dd8

View File

@@ -215,7 +215,7 @@
return return
} }
if (image.category === "main_product" || image.category === "product") { if (image.category === "product") {
listing.prodImageList.push({ listing.prodImageList.push({
url: imageUrl, url: imageUrl,
selected: getImageSelected(image.isSelected) selected: getImageSelected(image.isSelected)
@@ -357,7 +357,7 @@
const paramsList = [] const paramsList = []
selectList.value.forEach((item: ListingItem) => { selectList.value.forEach((item: ListingItem) => {
const params = { const params = {
id: null, id: itemId.value,
title: item.productName, title: item.productName,
description: item.desc, description: item.desc,
price: item.price, price: item.price,
@@ -420,7 +420,6 @@
const handleFetchItemDetial = (list) => { const handleFetchItemDetial = (list) => {
fetchSketchDetail(list).then((res) => { fetchSketchDetail(list).then((res) => {
console.log(res)
res.forEach((item, index) => { res.forEach((item, index) => {
if (!selectList.value[index]) return if (!selectList.value[index]) return
selectList.value[index].sketchList = item.clothes.map((el) => ({ url: el })) selectList.value[index].sketchList = item.clothes.map((el) => ({ url: el }))
@@ -443,7 +442,7 @@
onMounted(() => { onMounted(() => {
const data = history.state const data = history.state
if (data?.type === "edit") { if (data?.type === "edit") {
itemId.value = history.state?.id || "" itemId.value = history.state?.id
handleGetDetailById() handleGetDetailById()
} else { } else {
const designItemIds = history.state?.designItemIds || [] const designItemIds = history.state?.designItemIds || []