Browse Source

店铺列表调整

master
梁欣 1 year ago
parent
commit
664a461070
  1. 43
      pages/shop/list.vue

43
pages/shop/list.vue

@ -24,19 +24,26 @@
<view class="shop-item" v-for="(item, index) in list.data" :key="index" @click="toDetail(item.shop_id)">
<image :src="item.logo_url" mode="aspectFill"/>
<view class="content">
<view class="name-wrap">
<text class="title">{{ item.shop_name }}</text>
<image v-if="item.type === 1" mode="widthFix" src="../../static/qiye.png"></image>
<image v-else mode="widthFix" src="../../static/geren.png"></image>
</view>
<view class="cate">
<text class="tips">{{ item.category.name }}</text>
<text class="tips cate-name">{{ item.category.name }}</text>
<text class="tips">营业时间:{{ item.shop_hours }}</text>
</view>
<view class="score-wrap">
<view class="score">
<u-rate size="25" active-color="#f4a213" :current="item.score" :disabled="true"/>
<view style="font-size: 25rpx;">{{ item.comment_count }}人评价</view>
<text style="font-size: 25rpx;">{{ item.comment_count }}人评价</text>
</view>
<text class="sales">销量: {{ item.goods_sales }}</text>
</view>
<view class="address">
<text class="tips">{{ item.full_address }}</text>
<text class="tips oneline-hide" style="width: 400rpx">{{ item.full_address }}</text>
<u-icon name="arrow-right"/>
<view class="sales-wrap">
<text>销量: {{ item.goods_sales }}</text>
<text>距离: {{ item.distance }}km</text>
</view>
</view>
@ -206,19 +213,33 @@ export default {
margin: 5rpx 0;
}
.score-wrap {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
.score {
display: flex;
align-items: center;
justify-content: flex-start;
}
.sales {
color: #4D0868;
}
}
.cate {
display: flex;
align-items: center;
justify-content: flex-start;
:first-child {
.cate-name {
margin-right: 15rpx;
background-color: #F8EEF7;
padding: 5px;
border-radius: 999rpx;
}
}
@ -235,10 +256,20 @@ export default {
margin-left: 15rpx;
font-size: 25rpx;
flex-shrink: 0;
color: #ef0021;
color: #4D0868;
}
}
}
}
.name-wrap {
display: flex;
align-items: center;
justify-content: flex-start;
image {
margin-left: 15rpx;
width: 100rpx;
}
}
</style>
Loading…
Cancel
Save