This commit is contained in:
2020-07-16 17:39:06 +08:00
parent 91241682de
commit b250d05adf
14 changed files with 497 additions and 72 deletions

View File

@@ -1,25 +1,33 @@
<template>
<view class="item">
<image class="head"></image>
<text class="title">商品名</text>
<image class="head" :src="item.groupbuy_image1"></image>
<text class="title u-line-2">{{ item.goods_name }}</text>
<view class="price">
<text>99</text>
<text>299</text>
<text>{{ item.groupbuy_price }}</text>
<text>{{ item.goods_price }}</text>
</view>
<view class="info">
<text>剩余21</text>
<text>剩余{{ item.inventory | formatValue }}</text>
<text>立即购买</text>
</view>
</view>
</template>
<script>
export default {
name:"item"
name:"item",
props: ['item'],
filters: {
formatValue(value) {
let temp = Number(value);
if(temp > 999) temp = '999+';
return temp;
}
}
}
</script>
<style lang="scss" scoped>
.item{
width: 210rpx;
width: 220rpx;
.head{
width: 210rpx;
height: 131rpx;
@@ -43,6 +51,7 @@ export default {
>text:last-child{
font-size: 24rpx;
color: #999;
text-decoration: line-through;
}
}
@@ -50,7 +59,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
font-size: 20rpx;
margin-top: 19rpx;
>text:first-child{
color: #666;