<template>
	<view class="home main-bg shadow">
		<view class="home-header header-long-bg">
			<!-- <view class="header-text font-forty font-color1">惠军通</view> -->
			<image class="header-img" src="/static/img.png"></image>
		</view>
		<view class="add">
			<view class="add-title font-thirty font-color3">服务推荐</view>
			<view class="add-view">
				<view class="add-list shadow3 padding" @click="goto('/pages/soldier/home/policy?type=006')">
					<view class="list-title font-thirty-two font-color3">
						就业信息
					</view>
					<view class="list-icon font-twenty-two font-color1">最新</view>
					<image src="/static/41.png"></image>
				</view>
				<view class="add-list shadow3" @click="goto('/pages/soldier/home/policy?type=007')">
					<view class="list-title font-thirty-two font-color3">
						创业政策
					</view>
					<view class="list-icon font-twenty-two font-color1">热门</view>
					<image src="/static/42.png"></image>
				</view>
				<view class="add-list shadow3 padding" @click="goto('/pages/soldier/home/policy?type=008')">
					<view class="list-title font-thirty-two font-color3">
						模范企业
					</view>
					<view class="list-icon font-twenty-two font-color1">热门</view>
					<image src="/static/43.png"></image>
				</view>
				<view class="add-list shadow3" @click="goto('/pages/soldier/home/policy?type=009')">
					<view class="list-title font-thirty-two font-color3">
						创业孵化基地
					</view>
					<view class="list-icon font-twenty-two font-color1">热门</view>
					<image src="/static/44.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>
	
<script>
	import server from "@/api/index";
	import { mapGetters } from 'vuex'
	export default {
		data() {
			return {
			}
		},
		methods: {
			goto(url){
				uni.navigateTo({
					url
				});
			},
			gotoTab(url){
				let role = uni.getStorageSync('role');
				console.log(role)
				if(role === '1'){
					uni.switchTab({
						url
					});
				}else{
					uni.navigateTo({
						url: '/pages/login/index?id=1'
					});
				}
			},
		}
	}
</script>
<style lang="scss" scoped>
	.home{
		width: 100%;
		height: 100vh;
		position: relative;
		.home-header{
			width: 100%;
			height: 180rpx;
			border-bottom-left-radius: 50rpx;
			border-bottom-right-radius: 50rpx;
			padding-top: 30rpx;
			padding-left: 30rpx;
			position: relative;
			.header-text{
				height: 96rpx;
				line-height: 96rpx;
			}
			.header-img{
				position: absolute;
				top: 20rpx;
				left: 30rpx;
				width: calc(100% - 60rpx);
				height: 360rpx;
				border-radius: 24rpx;
			}
		}
		.add{
			margin-top: 190rpx;
			width: calc(100% - 30rpx);
			height: 629rpx;
			padding-left: 30rpx;
			.add-title{
				height: 120rpx;
				line-height: 120rpx;
				font-weight: 550;
				letter-spacing: 2rpx;
			}
			.add-view{
				display: flex;
				flex-wrap: wrap;
				justify-content: left;
				.add-list{
					width: calc(50% - 16rpx);
					height: 200rpx;
					border-radius: 8rpx;
					margin-bottom: 30rpx;
					padding-left: 30rpx;
					padding-top: 40rpx;
					position: relative;
					.list-title{
						font-weight: 550;
						letter-spacing: 2rpx;
					}
					.list-icon{
						width: 96rpx;
						height: 36rpx;
						margin-top: 26rpx;
						background: linear-gradient(270deg, rgba(204, 16, 25, 0.5) 0%, #CC1019 100%);
						border-radius: 24rpx;
						text-align: center;
					}
					image{
						width: 128rpx;
						height: 120rpx;
						position: absolute;
						bottom: 5rpx;
						right: 0rpx;
					}
				}
				.padding{
					margin-right: 30rpx;
				}
			}
		}
	}
</style>

