frontend_h5/treegitee/pages/exchange/goods.vue

114 lines
2.4 KiB
Vue

<template>
<view>
<view class="waterfall-box" v-for="(item, index) in list" :key="index">
<view @click="godetail(item.id)" style="border-radius: 8rpx;margin: 30rpx 20rpx 0 0;position: relative;width: 100%;">
<u-image :src="item.main_image" :lazy-load="true" width="100%" height="160" mode="aspectFill"></u-image>
<view class="flex_center flex_items ptb15" style="width: 100%;background:rgba(255, 45, 0,.2);">
<text style="color: #fff;" class="f26">剩余库存:{{item.stock}}</text>
</view>
<view class="f28 mt10 con" style="color: #333;">{{item.name}}</view>
<view class="mt10 flex_between flex_items">
<text class="f26" style="color: #EA5404;">{{item.price}}积分</text>
<view class="f24 pos" style="color: #B8B8B8;">
<text>{{item.real_price}}</text>
<view class="abs" style="width: 100%;height:2rpx;background:#b8b8b8;top: 16rpx;"></view>
</view>
</view>
</view>
</view>
<Ywatermark :info="'蓝色兄弟'"></Ywatermark>
</view>
</template>
<script>
export default {
name: "MyGoodsDemo",
props: {
list: {
type: Array,
default: []
}
},
data() {
return {
};
},
methods:{
godetail(idx){
this.$emit("godetail",idx)
}
}
}
</script>
<style lang="scss">
.waterfall-box {
border-radius: 8rpx;
margin: 30rpx 20rpx 0 0;
position: relative;
.box-item-title {
width: 320rpx;
font-size: 26rpx;
margin-top: 10rpx;
color: #434343;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.box-item-price {
font-size: 30rpx;
color: #ff4142;
margin-top: 10rpx;
}
.box-item-tag {
display: flex;
margin-top: 10rpx;
.tag-owner {
background-color: #FF4142;
color: #FFFFFF;
display: flex;
align-items: center;
padding: 4rpx 14rpx;
border-radius: 50rpx;
font-size: 16rpx;
line-height: 1;
}
.tag-text {
border: 1px solid #FF4142;
color: #FF4142;
margin-left: 20rpx;
border-radius: 50rpx;
line-height: 1;
padding: 4rpx 14rpx;
display: flex;
align-items: center;
font-size: 20rpx;
}
}
.box-comment {
font-size: 22rpx;
color: $u-tips-color;
margin-top: 5px;
}
.con {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
</style>