<template>
	<view>
		<view v-for="(item,i) in list" class="selectItem" :key="i"  @click="goUrl(item)" >
			{{item.name}}>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[
					{
						name:"选择停车场",url:"pages/main/ahtml/homepage",
						s:1
					},
					{
						name:"停车场详情页",url:"pages/main/ahtml/parkingDetails"
					},
					{
						name:"地锁说明",url:"pages/main/ahtml/lockDescribe"
					},
					{
						name:"个人信息",url:"pages/main/ahtml/information"
					},
					{
						name:"地锁详情",url:"pages/main/ahtml/lockInfo"
					},
					{
						name:"个人中心",url:"pages/main/ahtml/center",
						s:1
					},
					{
						name:"选择停车场",url:"pages/main/ahtml/homepage"
					}
				]
			}
		},
		methods: {
			goUrl(item){
				if(item.s){
					uni.switchTab({
						url:"/"+item.url
					})
				}else{
					uni.navigateTo({
						url:"/"+item.url
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss" >
	.selectItem{
		margin: 20px;
	}
</style>
