deming/components/shop/group/item.vue

79 lines
1.7 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-08-05 21:06:29 +08:00
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
2020-07-20 17:17:41 +08:00
<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() {
2020-07-24 19:48:57 +08:00
// 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: {
2020-08-08 18:15:07 +08:00
// id: this.info.pintuan_id,
id: this.info.pintuan_goods_id,
// type: 2,
2020-07-21 21:02:28 +08:00
}
})
}
2020-07-20 17:17:41 +08:00
}
2020-06-11 16:12:04 +08:00
}
</script>
<style lang="scss" scoped>
.item{
2020-08-06 20:42:03 +08:00
width: 220rpx;
height: 100%;
// overflow: hidden;
2020-06-11 16:12:04 +08:00
.head{
2020-08-05 21:39:02 +08:00
width: 100%;
height: 180rpx;
2020-06-11 16:12:04 +08:00
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-08-05 21:39:02 +08:00
margin-bottom: 12rpx;
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>