2025-09-03 21:06:28 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="shop-view" @click.stop="onClick">
|
2025-11-10 00:13:44 +08:00
|
|
|
<image :src="obj.url" class="top-img" mode="widthFix"></image>
|
2025-09-03 21:06:28 +08:00
|
|
|
<view class="shop-bottom-panel">
|
2025-11-07 17:23:37 +08:00
|
|
|
<text class="text-30 text-zu text-overflow" style="padding-top:8rpx">{{obj.title}}</text>
|
2025-11-10 00:13:44 +08:00
|
|
|
<view class="flex-r-lr" style="width:100%;margin-top:10rpx;margin-bottom: 14px;">
|
2025-09-03 21:06:28 +08:00
|
|
|
<text class="text-28 text-zi text-bold">¥{{obj.price}}</text>
|
|
|
|
|
<text class="text-24 " style="color:#999">已售{{obj.sales}}件</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import MyBtn from '@/components/common/my-btn.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components:{MyBtn},
|
|
|
|
|
props:{
|
|
|
|
|
obj:{
|
|
|
|
|
type:Object,
|
|
|
|
|
default:()=>{}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onClick(){
|
|
|
|
|
this.$emit('ok',this.obj.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.shop-view{
|
|
|
|
|
width:332rpx;
|
2025-11-07 17:23:37 +08:00
|
|
|
border-radius: 12rpx;
|
2025-09-03 21:06:28 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
.top-img{
|
|
|
|
|
width:332rpx;
|
2025-11-10 00:13:44 +08:00
|
|
|
display: block;
|
2025-11-07 17:23:37 +08:00
|
|
|
border-radius: 12rpx;
|
2025-09-03 21:06:28 +08:00
|
|
|
}
|
|
|
|
|
.shop-bottom-panel{
|
|
|
|
|
width:100%;
|
|
|
|
|
padding: 0 12rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2025-11-07 17:23:37 +08:00
|
|
|
.text-overflow {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
2025-09-03 21:06:28 +08:00
|
|
|
</style>
|