fix 首页价格显示
This commit is contained in:
parent
bb3d0c8c0b
commit
fd38145ac4
@ -186,9 +186,6 @@ Component({
|
||||
});
|
||||
this.selectSpecsName(selectedSkuValues.length > 0 ? selectedAttrStr : '');
|
||||
if (skuItem) {
|
||||
console.log(skuItem[0], '选中的item');
|
||||
console.log(skuItem[0]?.priceInfo[0]?.price, '选中的item');
|
||||
console.log(skuItem[0]?.priceInfo[1]?.price, '选中的item');
|
||||
this.setData({
|
||||
selectedSkuId: skuItem[0]?.skuId,
|
||||
selectItem: skuItem,
|
||||
@ -292,6 +289,9 @@ Component({
|
||||
const {
|
||||
skuList,
|
||||
primaryImage,
|
||||
minSalePrice,
|
||||
maxSalePrice,
|
||||
maxLinePrice,
|
||||
} = details;
|
||||
|
||||
// details.desc = details.desc.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
|
||||
@ -311,6 +311,9 @@ Component({
|
||||
this.setData({
|
||||
details,
|
||||
isStock: details.spuStockQuantity > 0,
|
||||
maxSalePrice: maxSalePrice ? parseInt(maxSalePrice) : 0,
|
||||
maxLinePrice: maxLinePrice ? parseInt(maxLinePrice) : 0,
|
||||
minSalePrice: minSalePrice,
|
||||
skuArray: skuArray,
|
||||
primaryImage,
|
||||
});
|
||||
|
@ -3,6 +3,7 @@
|
||||
"usingComponents": {
|
||||
"t-toast": "tdesign-miniprogram/toast/toast",
|
||||
"goods-card": "/components/goods-card/index",
|
||||
"specs-popup": "/components/specs-popup/index"
|
||||
"specs-popup": "/components/specs-popup/index",
|
||||
"price": "/components/price/index"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user