Compare commits
3 Commits
c8c4cd6bd4
...
b2b56f4c02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2b56f4c02 | ||
|
|
71b2bc1d6b | ||
|
|
3115b45600 |
@ -38,12 +38,12 @@
|
||||
|
||||
|
||||
<!-- 未搜索到 -->
|
||||
<view class="empty" v-if="isSearched && searchGoodsLisat.length == 0">
|
||||
<view class="empty" v-if="isSearched && !searchGoodsLisat">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
|
||||
对不起没有找到您想要的商品
|
||||
</view>
|
||||
|
||||
<view class="searchList" v-if="isSearched && searchGoodsLisat.length > 0">
|
||||
<view class="searchList" v-if="isSearched && searchGoodsLisat && searchGoodsLisat.length > 0">
|
||||
<!-- <view class="searchSubTit">
|
||||
<view class="searchSubItem">综合</view>
|
||||
<view class="searchSubItem">
|
||||
@ -112,24 +112,23 @@
|
||||
</view>
|
||||
|
||||
<view class="GGList" v-if="item.isShow">
|
||||
<view class="GGItem" v-for="ite in item.commodity_goods_info_list" :key="ite.id"
|
||||
@click="goods(item)">
|
||||
<view class="GGItem_Image">
|
||||
<view class="GGItem" v-for="ite in item.commodity_goods_info_list" :key="ite.id">
|
||||
<view class="GGItem_Image" @click="goods(item)">
|
||||
<view class="tag tag-img" v-if="ite.is_same_day">当日达</view>
|
||||
<image :src="handleImageUrl(ite.commodity_pic)" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="GGItem_Con">
|
||||
<view class="GGItem_Con_Tit">
|
||||
<view class="GGItem_Con_Tit" @click="goods(item)">
|
||||
<view class="tag tag-text" v-if="ite.is_same_day">当日达</view>
|
||||
{{ ite.goods_name }}
|
||||
</view>
|
||||
<view class="GGItem_Con_Msg">
|
||||
<view class="GGItem_Con_Msg_left">
|
||||
<view class="GGItem_Con_Msg_left" @click="goods(item)">
|
||||
<span>¥</span>{{ ite.sales_price }}
|
||||
</view>
|
||||
<view class="GGItem_Con_Msg_right">
|
||||
<u-number-box :value="ite.quantity || 0" :min="0"
|
||||
@change="(value) => handleQuantityChange(value, ite)">
|
||||
@change="(value) => handleQuantityChange.stop(value, ite)">
|
||||
<view slot="minus" class="minus">
|
||||
<u-icon name="minus" size="20"></u-icon>
|
||||
</view>
|
||||
@ -207,7 +206,7 @@ export default {
|
||||
request(apiArr.goodsSearch, "POST", params).then((res) => {
|
||||
// 深拷贝接口数据,避免引用问题
|
||||
const commodityList = JSON.parse(JSON.stringify(res.commodity_list));
|
||||
commodityList.forEach((item) => {
|
||||
commodityList?.forEach((item) => {
|
||||
// 初始化isShow为响应式属性
|
||||
this.$set(item, 'isShow', false);
|
||||
item.commodity_goods_info_list.forEach((param) => {
|
||||
@ -215,7 +214,7 @@ export default {
|
||||
const goods = this.goodsDetail.find(g => g.goods_id === param.id);
|
||||
this.$set(param, 'quantity', goods ? goods.count : 0);
|
||||
});
|
||||
});
|
||||
}) || [];
|
||||
this.searchGoodsLisat = commodityList;
|
||||
});
|
||||
}
|
||||
@ -366,7 +365,7 @@ export default {
|
||||
// 同步商品列表中的数量与购物车数据
|
||||
syncGoodsQuantities() {
|
||||
// 遍历所有商品,同步数量
|
||||
this.searchGoodsLisat.forEach((item) => {
|
||||
this.searchGoodsLisat?.forEach((item) => {
|
||||
item.commodity_goods_info_list.forEach((param) => {
|
||||
const goods = this.goodsDetail.find(g => g.goods_id === param.id);
|
||||
if (goods) {
|
||||
|
||||
@ -321,7 +321,7 @@ export default {
|
||||
contact_name: that.contact_name,
|
||||
phone: that.contact_phone,
|
||||
bank_card: that.bank_card,
|
||||
store_name: that.store_name,
|
||||
merchant_name: that.store_name,
|
||||
address: that.address,
|
||||
ad_code: that.confirmBusiness.ad_code,
|
||||
facade_photo,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user