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