| | |
| | | <view class="box"> |
| | | <view class="search"> |
| | | <u-search placeholder="请输入商品名称搜索" height="36" searchIconColor="#999999" borderColor="#EEEEEE" |
| | | bgColor="#F9F9FB" :showAction="false" v-model="goodsName" @search="search" /> |
| | | bgColor="#F9F9FB" :showAction="false" v-model="goodsName" @search="search" @clear="goodsList = []" /> |
| | | </view> |
| | | <view class="history" v-if="historyList && historyList.length > 0"> |
| | | <view class="history-title">历史搜索</view> |
| | |
| | | </view> |
| | | <template v-if="isSearch"> |
| | | <view class="list"> |
| | | <image class="list-notfund" v-if="goodsList.length === 0" src="/static/images/default_search@2x.png" mode="widthFix"></image> |
| | | <image class="list-notfund" v-if="goodsList.length === 0" src="/static/images/default_nodata_white.png" mode="widthFix"></image> |
| | | <view class="commodity-item" v-for="(item, i) in goodsList" :key="i" v-else @click="jumpDetails(item.id)"> |
| | | <view class="commodity-item-image"> |
| | | <image :src="item.imgurl" mode="widthFix"></image> |
| | |
| | | num: 1 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '添加成功', icon: 'success' }) |
| | | uni.showToast({ title: '添加成功', icon: 'success', mask: true }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | .commodity-item-image { |
| | | width: 100%; |
| | | height: 336rpx; |
| | | overflow: hidden; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |