| | |
| | | </view> |
| | | |
| | | <!-- 分类下拉面板 --> |
| | | <view class="category-dropdown" v-if="showCategoryDropdown" @click.stop> |
| | | <view class="category-dropdown" :class="{ 'align-first': !itemData.params.is_sort }" v-if="showCategoryDropdown" @click.stop> |
| | | <view class="sort-option" v-for="(option, index) in categoryOptions" :key="index" @click="selectCategory(index)"> |
| | | <text class="sort-option-text" :class="{ 'active': currentCategory === index }">{{ option.name }}</text> |
| | | <text class="sort-option-check" v-if="currentCategory === index">✓</text> |
| | |
| | | > |
| | | <!-- 团购列表 --> |
| | | <view class="groupbuy-item" v-for="(supplier, index) in listData" :key="index"> |
| | | <view class="supplier-data" @click="gotoSupplier(supplier.supplier_id)"> |
| | | <view class="supplier-data" @click="gotoSupplier(supplier.shop_supplier_id)"> |
| | | <!-- 商户名称 --> |
| | | <view class="supplier-name"> |
| | | {{ supplier.supplier_name || '商户名称' }} |
| | |
| | | <view class="supplier-detail-left"> |
| | | <image v-if="itemData.style.server_score_image" :src="itemData.style.server_score_image" class="supplier-detail-img" mode="aspectFill"></image> |
| | | <view class="supplier-detail-score">{{ supplier.server_score }} {{ supplier.server_score_text }}</view> |
| | | <view class="supplier-detail-comment" v-if="supplier.comment > 0">{{ supplier.comment }}条评论</view> |
| | | <view class="supplier-detail-comment" v-if="supplier.comment_count > 0">{{ supplier.comment_count }}条评论</view> |
| | | <view class="supplier-detail-price" v-if="supplier.average_price > 0">¥{{ supplier.average_price }}/人</view> |
| | | </view> |
| | | <view class="supplier-detail-right"> |
| | |
| | | this.gotoPage(url); |
| | | }, |
| | | gotoSupplier(supplierId) { |
| | | let url = '/pages/shop/shop?supplier_id=' + supplierId; |
| | | let url = '/pages/shop/shop?shop_supplier_id=' + supplierId; |
| | | uni.setStorageSync('shop_supplier_id',supplierId) |
| | | this.gotoPage(url); |
| | | } |
| | | } |
| | |
| | | |
| | | <style scoped> |
| | | .diy-groupbuy { |
| | | position: relative; |
| | | padding: 24rpx; |
| | | padding-top: 0; |
| | | } |
| | |
| | | /* 排序下拉面板 */ |
| | | .sort-dropdown, |
| | | .category-dropdown { |
| | | position: fixed; |
| | | position: absolute; |
| | | top: 88rpx; |
| | | z-index: 200; |
| | | width: 200rpx; |
| | |
| | | left: calc(24rpx + 200rpx + 20rpx); |
| | | } |
| | | |
| | | .category-dropdown.align-first { |
| | | left: 24rpx; |
| | | } |
| | | |
| | | .sort-option { |
| | | display: flex; |
| | | justify-content: space-between; |