修改购物车逻辑
This commit is contained in:
@ -256,8 +256,11 @@
|
||||
|
||||
// 添加到购物车(默认商品数量+1,可以让后端连表查询商品数量字段)
|
||||
async addCartFun(item) {
|
||||
console.log("🚀 ~ addCartFun ~ item:", item)
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/shop?id=${item.id}&showPopup=true`
|
||||
})
|
||||
return
|
||||
|
||||
// 限购逻辑
|
||||
if (item.first_category_id === 1 || item.first_category_id === 2) {
|
||||
// 统计购物车中同类商品的总数量
|
||||
@ -346,7 +349,7 @@
|
||||
|
||||
// 去结算
|
||||
goSettle() {
|
||||
console.log(this.cartLists)
|
||||
console.log(this.cartLists)
|
||||
this.showCart = false
|
||||
const goods = this.cartLists.map(item => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user