<template>
	<view class="near-good" @click="goDetail">
		<image :src="goodItem.CoverImg" mode="aspectFill"></image>
		<view class="good-name">{{goodItem.Name.substring(0,6)+'...'}}</view>
	</view>
</template>

<script>
	export default {
		props: {
			goodItem: {
				type: Object,
				default: null
			},
			goodType: {
				type: Number,
				default: 0
			}
		},
		data() {

		},
		created() {

		},
		methods: {
			//页面跳转
			goDetail() {
				// let myDayObj = JSON.stringify(this.dayObj);
				// uni.navigateTo({
				// 	url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj
				// });
			}
		}
	}
</script>

<style>
	.near-good {
		margin-right: 20rpx;
		flex-shrink: 0;
	}

	.near-good image {
		width: 200rpx;
		height: 200rpx;
		border-radius: 20rpx;
		margin-bottom: 29rpx;
	}

	.near-good .good-name {
		font-weight: bold;
		color: #1F1F1F;
		font-size: 28rpx;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}
</style>
