123 lines
2.7 KiB
Vue
123 lines
2.7 KiB
Vue
<template>
|
|
<view class="shop-view" @click="onClick">
|
|
<view class="shop-left-view">
|
|
<image :src="obj.url" lazy-load></image>
|
|
</view>
|
|
<view class="shop-right-view">
|
|
<view class="shop-top-img">
|
|
<image src="https://static.tbmall.xin/static/home/xyx.png"
|
|
style="width: 122rpx;height: 28rpx;margin-right: 12rpx;"></image>
|
|
<image src="https://static.tbmall.xin/static/home/xs.png" v-if="obj.limitedTime"
|
|
style="width: 52rpx;height: 28rpx;margin-right: 12rpx;"></image>
|
|
<image src="https://static.tbmall.xin/static/home/tg.png" v-if="obj.tag"
|
|
style="width: 80rpx;height: 28rpx;"></image>
|
|
</view>
|
|
<view class="right-top-view text-overflow1">
|
|
<text class="text-32 text-bold text-zu text-overflow1">{{ obj.title }}</text>
|
|
</view>
|
|
<view class="shop-price" @ok.stop="onClick">
|
|
<view class="price-left"><text style="font-size: 24rpx;">¥</text>{{ obj.couponPrice || obj.price }}
|
|
</view>
|
|
<view class="price-center">专区立省{{ Number(obj.adPrice) - Number(obj.price) }}元</view>
|
|
<image src="https://static.tbmall.xin/static/home/qiang.png" style="width: 80rpx;height: 80rpx;">
|
|
</image>
|
|
</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: 700rpx;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20rpx;
|
|
box-sizing: border-box;
|
|
background-color: #fff;
|
|
border-radius: 16rpx;
|
|
|
|
.shop-left-view {
|
|
min-width: 216rpx;
|
|
min-height: 216rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
image {
|
|
width: 220rpx;
|
|
height: 220rpx;
|
|
border-radius: 8rpx;
|
|
}
|
|
}
|
|
|
|
.shop-right-view {
|
|
width: 100%;
|
|
display: flex;
|
|
min-height: 216rpx;
|
|
margin-left: 24rpx;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
|
|
.shop-top-img {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
|
|
image {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.right-top-view {
|
|
width: 100%;
|
|
display: flex;
|
|
|
|
}
|
|
|
|
.shop-price {
|
|
background: linear-gradient(270deg, #F0E7FE 0%, rgba(240, 231, 254, 0) 100%);
|
|
width: 100%;
|
|
height: 80rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
|
|
.price-left {
|
|
font-weight: bold;
|
|
font-size: 28rpx;
|
|
color: #7934F6;
|
|
}
|
|
|
|
.price-center {
|
|
font-size: 20rpx;
|
|
color: #7934F6;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|