deming/components/shop/group/item.vue
2020-07-24 19:48:57 +08:00

77 lines
1.6 KiB
Vue

<template>
<view class="item" @click="toDetailsPage">
<image class="head" :src="info.pintuan_image"></image>
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
<view class="price">
<view>{{ info.pintuan_goods_price }}</view>
<view>立即拼团</view>
</view>
</view>
</template>
<script>
export default {
name:"item",
props: {
info: Object
},
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',
// })
// }
// })
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: this.info.pintuan_id,
type: 2,
}
})
}
}
}
</script>
<style lang="scss" scoped>
.item{
width: 210rpx;
overflow: hidden;
.head{
width: 210rpx;
height: 131rpx;
border-radius: 6rpx;
}
.title{
display: inline-block;
width: 100%;
font-size: 26rpx;
color: #333;
margin-top: 10rpx;
}
.price{
// display: flex;
// align-items: center;
// justify-content: space-between;
margin-top: 10rpx;
> view:first-child{
font-size: 26rpx;
color: #FF3131;
margin-bottom: 4rpx;
}
> view:last-child{
font-size: 22rpx;
color: #FDD360;
}
}
}
</style>