2020-06-11 16:37:52 +08:00
|
|
|
<template>
|
2020-06-29 17:24:57 +08:00
|
|
|
<view class="item" @click="toDetailsPage">
|
2020-08-04 19:39:31 +08:00
|
|
|
<image :src="info.goods_image" mode="aspectFill" class="img"></image>
|
2020-06-11 16:37:52 +08:00
|
|
|
<view class="info">
|
2020-08-04 20:00:58 +08:00
|
|
|
<text class="title u-line-2">{{ info.goods_name }}</text>
|
|
|
|
<text class="jianjie u-line-1">{{ info.goods_advword }}</text>
|
2020-07-23 14:56:20 +08:00
|
|
|
<text class="price">¥{{ info.goods_price }}</text>
|
2020-06-11 16:37:52 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2020-06-18 14:57:26 +08:00
|
|
|
name:"item",
|
|
|
|
props: {
|
|
|
|
info: Object
|
2020-06-29 08:47:37 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2020-06-29 17:24:57 +08:00
|
|
|
toDetailsPage() {
|
2020-07-24 19:48:57 +08:00
|
|
|
// this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
|
|
|
// if (res.errCode == 0) {
|
|
|
|
// const goods = {
|
|
|
|
// goods: res.data,
|
|
|
|
// type: 1,
|
|
|
|
// }
|
|
|
|
// this.$store.commit('setGoodsDetails', goods);
|
|
|
|
// this.$store.commit('setGoodsId', this.info.goods_id);
|
|
|
|
// this.$u.route({
|
|
|
|
// url: 'pageB/sdetails/index',
|
|
|
|
// })
|
|
|
|
// // console.log(this.goodsInfo.mobile_body);
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
this.$u.route({
|
|
|
|
url: 'pageB/sdetails/index',
|
|
|
|
params: {
|
|
|
|
id: this.info.goods_id,
|
|
|
|
type: 1,
|
2020-06-29 08:47:37 +08:00
|
|
|
}
|
2020-07-24 19:48:57 +08:00
|
|
|
})
|
2020-06-29 08:47:37 +08:00
|
|
|
}
|
|
|
|
},
|
2020-06-11 16:37:52 +08:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.item{
|
|
|
|
width: 330rpx;
|
2020-08-05 22:06:09 +08:00
|
|
|
height: 520rpx;
|
2020-07-23 14:56:20 +08:00
|
|
|
margin-bottom: 26rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
background-color: #f8f8f8;
|
2020-07-23 14:56:20 +08:00
|
|
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
.img{
|
2020-07-23 14:56:20 +08:00
|
|
|
width: 330rpx;
|
2020-08-04 19:39:31 +08:00
|
|
|
height: 300rpx;
|
2020-07-23 14:56:20 +08:00
|
|
|
background: rgba(245,245,245,1);
|
|
|
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
|
|
|
margin-bottom: 24rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
}
|
|
|
|
.info{
|
2020-06-18 14:57:26 +08:00
|
|
|
width: 320rpx;
|
2020-07-23 14:56:20 +08:00
|
|
|
padding: 0 12rpx 28rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-around;
|
|
|
|
.title{
|
2020-08-04 22:34:03 +08:00
|
|
|
line-height: 40rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
font-size: 30rpx;
|
|
|
|
color: #333;
|
2020-07-23 14:56:20 +08:00
|
|
|
margin-bottom: 13rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
}
|
|
|
|
.jianjie{
|
|
|
|
font-size: 26rpx;
|
|
|
|
color: #666;
|
2020-07-23 14:56:20 +08:00
|
|
|
margin-bottom: 20rpx;
|
2020-08-04 22:34:03 +08:00
|
|
|
line-height: 38rpx;
|
2020-06-11 16:37:52 +08:00
|
|
|
}
|
|
|
|
.price{
|
|
|
|
color: #FF3131;
|
|
|
|
font-size: 26rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|