提交 0ce8210d authored 作者: 刘旭's avatar 刘旭

优化

上级 476c1ec3
...@@ -268,8 +268,8 @@ let togoods = (data: any) => { ...@@ -268,8 +268,8 @@ let togoods = (data: any) => {
sku: data.specifications, sku: data.specifications,
num: data.number num: data.number
}, },
partIds: data.partIds, partIds: data.partIds || [],
partList: data.partList, partList: data.partList || [],
isDefaultSku: true isDefaultSku: true
}) })
} }
......
...@@ -266,7 +266,7 @@ let buyNow = (selectShop: any) => { ...@@ -266,7 +266,7 @@ let buyNow = (selectShop: any) => {
data: el data: el
}) })
}); });
setTimeout(function () { setTimeout(() => {
handleClose() handleClose()
skuKey.value = false skuKey.value = false
}, 300); }, 300);
...@@ -319,7 +319,7 @@ const getProductId = (specText: any) => { ...@@ -319,7 +319,7 @@ const getProductId = (specText: any) => {
return productId return productId
} }
// 清sku数据 // 清sku数据
const handleClose = () => { const handleClose = () => {
goodsInfo.value = {} goodsInfo.value = {}
skuPopupRef.value.handClose() skuPopupRef.value.handClose()
......
...@@ -236,10 +236,8 @@ const buttonClick = () => { ...@@ -236,10 +236,8 @@ const buttonClick = () => {
if (specStore.partIds.length > 0) { if (specStore.partIds.length > 0) {
setTimeout(() => { setTimeout(() => {
partsData.value.forEach((item: any) => { partsData.value.forEach((item: any) => {
console.log(item.id, specStore.partIds); // console.log(item.id, specStore.partIds);
if (specStore.partIds.indexOf(item.id) !== -1) { if (specStore.partIds.indexOf(item.id) !== -1) item.show = true
item.show = true
}
}); });
goodsSkuRef.value.partsIds = specStore.partIds goodsSkuRef.value.partsIds = specStore.partIds
specStore.$reset() // 重置数据 specStore.$reset() // 重置数据
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论