deming/components/shop/group/item.vue

70 lines
1.4 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-20 17:17:41 +08:00
<text>{{ info.pintuan_goods_price }}</text>
<text>立即购买</text>
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;
.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;
margin-top: 16rpx;
}
.price{
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 19rpx;
>text:first-child{
font-size: 26rpx;
color: #FF3131;
}
>text:last-child{
color: #FDD360;
}
}
}
</style>