deming/components/shop/group/item.vue

70 lines
1.5 KiB
Vue
Raw Normal View History

2020-06-11 16:12:04 +08:00
<template>
2020-07-21 21:02:28 +08:00
<view class="item" @click="toDetailsPage">
2020-07-20 17:17:41 +08:00
<image class="head" :src="info.pintuan_image"></image>
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
2020-06-11 16:12:04 +08:00
<view class="price">
2020-07-23 20:58:56 +08:00
<view>{{ info.pintuan_goods_price }}</view>
<view>立即拼团</view>
2020-06-11 16:12:04 +08:00
</view>
</view>
</template>
<script>
export default {
2020-07-20 17:17:41 +08:00
name:"item",
props: {
info: Object
2020-07-21 21:02:28 +08:00
},
methods: {
toDetailsPage() {
this.$u.api.getPinTuanDetails({
pintuan_id: this.info.pintuan_id,
}).then(res => {
if(res.errCode == 0) {
const goods = {
goods: res.data.data,
type: 2,
}
this.$store.commit('setGoodsDetails', goods);
this.$store.commit('setGoodsId', this.info.pintuan_id);
this.$u.route({
url: 'pageB/sdetails/index',
})
}
})
}
2020-07-20 17:17:41 +08:00
}
2020-06-11 16:12:04 +08:00
}
</script>
<style lang="scss" scoped>
.item{
width: 210rpx;
2020-07-23 20:58:56 +08:00
overflow: hidden;
2020-06-11 16:12:04 +08:00
.head{
width: 210rpx;
height: 131rpx;
border-radius: 6rpx;
}
.title{
2020-07-20 17:17:41 +08:00
display: inline-block;
width: 100%;
2020-06-11 16:12:04 +08:00
font-size: 26rpx;
color: #333;
2020-07-23 20:58:56 +08:00
margin-top: 10rpx;
2020-06-11 16:12:04 +08:00
}
.price{
2020-07-23 20:58:56 +08:00
// display: flex;
// align-items: center;
// justify-content: space-between;
margin-top: 10rpx;
> view:first-child{
2020-06-11 16:12:04 +08:00
font-size: 26rpx;
color: #FF3131;
2020-07-23 20:58:56 +08:00
margin-bottom: 4rpx;
2020-06-11 16:12:04 +08:00
}
2020-07-23 20:58:56 +08:00
> view:last-child{
font-size: 22rpx;
2020-06-11 16:12:04 +08:00
color: #FDD360;
}
}
}
</style>