<template>
	<view id="info_title">
		<view>
			<view class="url_info" v-for="(item,index) in information" :key="index" @click="route_skip(index)">
				<image :src="item.url"></image>
				<text>{{item.text}}</text>
			</view>
		</view>
	</view>
</template>
<style lang="scss" scoped>
	.url_info {
		width: 127rpx;
		float: left;
		flex: 1;
	}

	.url_info image {
		width: 84rpx;
		height: 84rpx;
		margin: 0 auto;
		display: block;
		margin-bottom: 16rpx;
	}

	.url_info text {
		display: block;
		text-align: center;
		font-size: 28rpx;
		color: rgba(102, 102, 102, 1);
	}

	.sousuo {
		height: 113rpx;
		border: 1px #f00 solid;
	}

	#info_title {
		width: 620rpx;
		margin: 0 auto;
		padding: 37rpx 0;

	}

	#info_title>view {
		overflow: hidden;
		zoom: 1;
		display: flex;
		flex-wrap: wrap;
		display: -webkit-flex;
		/* Safari */
	}
</style>
<script>
	export default {
		props:['information'],
		name: "info_title",
		data() {
			return {
			}
		},
        watch: {
            information(newVal, old) {
                 console.log(newVal);
            },
            deep: true
        },
		methods: {
			// 点击顶部的标题模块跳转
			route_skip(index) {
				console.log(index)
				switch (index) {
					case 0:
						uni.navigateTo({
							url: '/pageD' + "/notice/notice"
						});
						break;
					case 1:
						uni.navigateTo({
							url: '/pageD' + "/activity/activity"
						});
						break;
					case 2:
						uni.navigateTo({
							url: '/pageD' + "/logistics/logistics"
						});
						break;
					case 3:
						uni.navigateTo({
							url: '/pageD' + "/attention/attention"
						});
						break;
					default:
						break;
				}
			},
			// 获取消息首页的内容
			messageIndex(){
				console.log("333")
				
			}
		}
	}
</script>
