This commit is contained in:
GaoHao
2024-08-05 17:53:58 +08:00
parent d09396adc9
commit 8e0afe82a6
7 changed files with 36 additions and 4401 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -307,7 +307,7 @@
<view class="shop_skuselect flex-start" v-if="specifications.tagSnap">
<view class="shop_skuselectname">{{skuidname.toString()}}</view>
</view>
<view class="addShopping" :class="amountcartNumber>0?'active':''"
<view class="addShopping" :class="(amountcartNumber>0&&isSpec)?'active':''"
@click="addShopping(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
添加到购物车</view>
</view>
@@ -348,6 +348,8 @@
}, // 规格信息
socketTicket: null,
amountcartNumber: 0,
isSpec: true,
skuBtnText: "添加到购物车",
skuNumber: 0,
skuSuit: 0,
salePrice: '', //钱数
@@ -535,7 +537,7 @@
* 添加购物车
*/
addShopping(item, index, index1, a, b) {
if (this.amountcartNumber <= 0) {
if (this.amountcartNumber <= 0 && isSpec) {
return;
}
let num = 0;
@@ -695,8 +697,24 @@
* @param {Object} item
*/
async morloe(e, index, index1, item) {
this.specifications.tagSnap[index]['start'] = index1
this.skuidname.splice(index, 1, e) //替换skuidname的数据
this.specifications.tagSnap[index]['start'] = index1;
this.skuidname.splice(index, 1, e); //替换skuidname的数据
this.isSpec = true;
let querySpecList = [];
this.specifications.tagSnap.forEach((v,e) => {
querySpecList.push({
name: v.name,
value : v.children[v.start],
})
})
let res = await this.api.productquerySpec({
productId: item.id, //商品id
querySpecList: querySpecList,
})
if( res.code == 0 ){
// this.isSpec = false;
// this.skuBtnText = "";
}
this.hodgepodge(item, 2)
},
@@ -713,7 +731,8 @@
code: uni.cache.get('tableCode'),
shopId: uni.cache.get('shopUser'),
productId: item.id, //商品id
spec_tag: this.skuidname.join(",")
spec_tag: this.skuidname.join(","),
querySpecList: [],
})
this.salePrice = res.data.salePrice // 价格
let data = null;
@@ -753,7 +772,7 @@
return false
}
uni.navigateTo({
url: '/pages/order/confirm_order?storeInfo=' + JSON.stringify(this.shopInfo.storeInfo)
url: '/pages/order_food/confirm_order?storeInfo=' + JSON.stringify(this.shopInfo.storeInfo)
});
},

File diff suppressed because it is too large Load Diff