<template>
	<view class="her-scoller-study" :style="{
			'background-color': goodsInfo.backgroundColor
		}">
		<view class="her_Two_study" :style="{
			'background-color': goodsInfo.backgroundColor,
			'padding-top':goodsInfo.PaddingTop+'px',
			'padding-right':goodsInfo.PaddingRight+'px',
			'padding-bottom':goodsInfo.PaddingBottom+'px',
			'padding-left':goodsInfo.PaddingLeft+'px',
		}">			
			<view class="myStudy_five_study" @click="openGood(item)" v-for="(item, gli) in goodsInfo.list" :style="{borderRadius:goodsInfo.SearchFilletPX==0?10:goodsInfo.SearchFilletPX+'px'}" :key="gli">
				<view class="img-box">
					<image style="width: 100%; height: 100%;" mode="aspectFill" :src="item.picUrl" />
				</view>
				<view class="good-info">
					<view class="good-name" v-if="item.name">{{ item.name }}</view>
					<view class="good-price-info" v-if="item.lableName">
						<view class="price" style="font-size:12px;">{{ item.lableName }}</view>
					</view>
				</view>
			</view>
		</view>
		<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
	</view>
</template>
<script>
	import auth from '@/components/auth/index.vue';
	export default {
		components: {

			auth
		},
		props: ['goodsInfo'],
		data() {
			return {
				mainColor: '',
				showAuth: false,
				u: {},
			};
		},
		created() {
			this.mainColor = this.$uiConfig.mainColor;
		},
		methods: {
			openGood(item) {
				this.u = uni.getStorageSync('mall_UserInfo');
				
					if (item.linkUrl) {
						uni.navigateTo({
							url: item.linkUrl,
						});
					}
				
			},
			reloadUserinfo() {
				this.u = uni.getStorageSync('mall_UserInfo');
				// this.showAuth = false;
			},
			//关闭登录窗口
			gbAuth() {
				this.showAuth = false;
			}
		}
	};
</script>

<style>
	.her-scoller-study{
		padding:12px;
	}
	.myStudy_five_study {
		position: relative;
		margin-right: 14px;
		box-sizing: border-box;
		padding: 0 1px 1px 0;
		width:600px;
	}
	.myStudy_five_study:last-child{
		margin-right:0!important;
	}
	.myStudy_five_study .img-box {
		width: 210rpx;
		height: 280rpx;
		border-radius: 12px;
		overflow: hidden;
		box-shadow: 0 4px 10px 1px #D2D2D2;
	}
	
	.myStudy_five_study .good-info {
		padding: 20rpx 0px 12px 0px;
		flex: 1;
		border: 10rpx;
		padding-bottom: 0;
		display: flex;
		flex-direction: column;
		/* width:20%; */
	}
	
	.myStudy_five_study .good-info .good-name {
		font-size: 13px;
		margin-bottom:5px;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
		width:210rpx;
		font-weight: 600;
	}
	
	.myStudy_five_study .good-info .good-price-info {
		padding-bottom: 10rpx;
	}
	
	.myStudy_five_study .good-info .good-price-info .price {
		color: #999999;
		font-size: 14px;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
		display: block;
		width:130px;
		margin-top:10px;
	}
	.her_Two_study {
		overflow-x: auto !important;
		display: flex;
		/* white-space: nowrap; */
	}
	.style_five_label{
		float:left;
		padding: 2px 4px;
		border-radius: 2px;
		font-size: 10px;
		color: #FAF8F9;
		margin:0 5px 5px 0;
	}
	
</style>
