<template>
	<view>
		<u-navbar :is-back="false" title="首页" title-color="#fff" :background="{'background':'#107fc9'}"></u-navbar>


		<u-swiper :border-radius="0" :list="list" :height="450" ></u-swiper>

		<u-grid :col="3">
			<u-grid-item @click="switchTab('/pages/scan/index')">
				<u-icon name="/static/scan-active.png" :size="70"></u-icon>
				<view class="grid-text">资产扫描</view>
			</u-grid-item>
			<u-grid-item @click="switchTab('/pages/assets/index')">
				<u-icon name="/static/sync-active.png" :size="70"></u-icon>
				<view class="grid-text">资产同步</view>
			</u-grid-item>
			<u-grid-item @click="switchTab('/pages/upload/index')">
				<u-icon name="/static/upload-active.png" :size="70"></u-icon>
				<view class="grid-text">数据上传</view>
			</u-grid-item>
		</u-grid>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						image: '/static/1.jpg'
					},
					{
						image: '/static/2.jpg'
					},
					{
						image: '/static/3.jpg'
					},{
						image: '/static/4.jpg'
					},
				],
			}
		},
		methods: {
			switchTab(url) {
				this.$u.throttle(() => {
					uni.switchTab({
						url
					})
				})
			}
		},
		mounted() {

		}
	}
</script>

<style lang="scss">

	.grid-text {
		font-size: 28rpx;
		margin-top: 4rpx;
		color: $u-type-info;
	}
</style>
