deming/components/shop/group/item.vue

83 lines
1.8 KiB
Vue
Raw Normal View History

2020-06-11 08:12:04 +00:00
<template>
2020-07-21 13:02:28 +00:00
<view class="item" @click="toDetailsPage">
2020-08-05 13:06:29 +00:00
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
2020-07-20 09:17:41 +00:00
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
2020-06-11 08:12:04 +00:00
<view class="price">
2020-08-19 09:27:49 +00:00
<view class="value">{{ info.pintuan_goods_price }}</view>
<view class="btn">立即拼团</view>
2020-06-11 08:12:04 +00:00
</view>
</view>
</template>
<script>
export default {
2020-07-20 09:17:41 +00:00
name:"item",
props: {
info: Object
2020-07-21 13:02:28 +00:00
},
methods: {
toDetailsPage() {
2020-07-24 11:48:57 +00: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 10:15:07 +00:00
// id: this.info.pintuan_id,
id: this.info.pintuan_goods_id,
// type: 2,
2020-07-21 13:02:28 +00:00
}
})
}
2020-07-20 09:17:41 +00:00
}
2020-06-11 08:12:04 +00:00
}
</script>
<style lang="scss" scoped>
.item{
2020-08-06 12:42:03 +00:00
width: 220rpx;
height: 100%;
// overflow: hidden;
2020-06-11 08:12:04 +00:00
.head{
2020-08-05 13:39:02 +00:00
width: 100%;
height: 180rpx;
2020-06-11 08:12:04 +00:00
border-radius: 6rpx;
}
.title{
2020-07-20 09:17:41 +00:00
display: inline-block;
width: 100%;
2020-06-11 08:12:04 +00:00
font-size: 26rpx;
color: #333;
2020-07-23 12:58:56 +00:00
margin-top: 10rpx;
2020-06-11 08:12:04 +00:00
}
.price{
2020-08-17 10:09:19 +00:00
display: flex;
2020-08-20 08:16:34 +00:00
align-items: center;
2020-08-17 10:13:01 +00:00
// align-content: flex-end;
2020-08-17 10:09:19 +00:00
justify-content: space-between;
2020-08-19 09:27:49 +00:00
margin-top: 16rpx;
.value {
2020-06-11 08:12:04 +00:00
font-size: 26rpx;
color: #FF3131;
2020-08-19 09:27:49 +00:00
// margin-bottom: 12rpx;
2020-06-11 08:12:04 +00:00
}
2020-08-19 09:27:49 +00:00
.btn {
2020-07-23 12:58:56 +00:00
font-size: 22rpx;
2020-08-17 10:09:19 +00:00
height: 22rpx;
2020-06-11 08:12:04 +00:00
color: #FDD360;
2020-08-17 10:13:01 +00:00
text-align: end;
2020-08-19 09:27:49 +00:00
// margin-top:8rpx;
2020-06-11 08:12:04 +00:00
}
}
}
</style>