mirror of
https://gitee.com/niucloud-team/javashop.git
synced 2026-04-25 11:18:23 +00:00
1.0.1
This commit is contained in:
parent
e4a4dcdb4f
commit
e9a6b7a3a1
@ -242,6 +242,7 @@ const goodsDetail = computed(() => {
|
|||||||
if (idItem.sku_id == currSpec.value.skuId) {
|
if (idItem.sku_id == currSpec.value.skuId) {
|
||||||
idItem.sku_image = idItem.sku_image ? idItem.sku_image : data.goods.goods_cover
|
idItem.sku_image = idItem.sku_image ? idItem.sku_image : data.goods.goods_cover
|
||||||
data.detail = idItem;
|
data.detail = idItem;
|
||||||
|
Object.assign(data, idItem)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -284,6 +285,7 @@ const goodsDetail = computed(() => {
|
|||||||
// 仅用于展示
|
// 仅用于展示
|
||||||
minBuyShow.value = data.goods.min_buy;
|
minBuyShow.value = data.goods.min_buy;
|
||||||
}
|
}
|
||||||
|
console.log('sku',data)
|
||||||
return data;
|
return data;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,6 @@ const specSelectFn = (id: any) => {
|
|||||||
useGoodsDetailStore().goodsDetail.skuList.forEach((item: any, index: any) => {
|
useGoodsDetailStore().goodsDetail.skuList.forEach((item: any, index: any) => {
|
||||||
if (item.sku_id == id) {
|
if (item.sku_id == id) {
|
||||||
useGoodsDetailStore()?.setGoodsDetail(item);
|
useGoodsDetailStore()?.setGoodsDetail(item);
|
||||||
nsGoodsSkuData.value = JSON.parse(JSON.stringify(useGoodsDetailStore().goodsDetail))
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { redirect, getToken } from '@/utils/common'
|
import { redirect, getToken, deepClone } from '@/utils/common'
|
||||||
|
|
||||||
interface GoodsDetail {
|
interface GoodsDetail {
|
||||||
goodsDetail: AnyObject
|
goodsDetail: AnyObject
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user