<template>
	<home-frame @toPath="toPath">
		<view class="main">
			<view class="one">
				<view class="list" <view v-for="(item,index) in typeList" :key="index">
					<span>{{item.name}}</span>
				</view>
			</view>
			<view class="two">
				右侧列表
			</view>
		</view>
	</home-frame>
</template>

<script>
	import homeFrame from "../components/home-frame.vue";
	export default {
		components: {
			homeFrame
		},
		data() {
			return {
				typeList: [ // 类型信息
					{
						name: '厂商'
					},
					{
						name: '演员'
					},
				]
			};
		},
		onLoad() {

		},
		onShow() {

		},
		methods: {
			// 跳转页面
			toPath(e) {
				let url = `/${e.route}`;
				if (e.type == '0') uni.navigateTo({
					url
				})
				else if (e.type == '1') uni.redirectTo({
					url
				})
				else if (e.type == '2') uni.reLaunch({
					url
				})
				else if (e.type == '3') uni.switchTab({
					url
				})
			}
		},
	};
</script>

<style lang="scss">
	.main {
		background-color: var(--rgb161);
		display: flex;
		flex-direction: row;
		width: 100vw;
		height: 92vh;

		.one {
			width: 24vw;
			color: var(--rgbfff);
			margin: 0 10px 0 0;
			box-shadow: 0 0 5px #ff0000;
		}

		.two {
			flex-grow: 1;
			color: var(--rgbfff);
			border: 1px solid #ff0000;
		}
	}
</style>
