代码更新

This commit is contained in:
GaoHao
2025-03-04 18:30:16 +08:00
parent fd0c452a76
commit 4f65b08c06
32 changed files with 622 additions and 1616 deletions

View File

@@ -1,6 +1,6 @@
// 返回购物车未下单的数据
export function getNowCart(carItem,goodsList) {
export function getNowCart(carItem,goodsList,user) {
// console.log("carItem===",carItem)
// console.log("goodsList===",goodsList)
// const nowCart = records.find(v => v.placeNum == 0)
@@ -10,9 +10,16 @@ export function getNowCart(carItem,goodsList) {
if(carItem.product_id == goodsItem.id){
goodsItem.skuList.map(item=>{
if(carItem.sku_id == item.id){
console.log(item)
carItem.lowPrice = item.salePrice
carItem.lowMemberPrice = item.memberPrice
carItem.specInfo = item.specInfo
if( uni.getStorageSync('shopInfo').isMemberPrice && user && user.id && user.isVip ){
carItem.salePrice = item.memberPrice
} else {
carItem.salePrice = item.salePrice
}
}
})
carItem.name = goodsItem.name