<template>
	<view class="city">
		<view class="city-hd">
			<view class="a" @click="openPage(1)">
				南京<image src="@/static/city-arrow.png"></image>
			</view>
			<view class="b" @click="openPage(2)">请输入</view>
		</view>
		<view class="city-bd">
			<view class="fl">当前定位：<text>软件大道花神庙</text></view>
			<view class="fr">
				<image src="@/static/city-reset.png"></image>重新定位
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
			openPage(index){
				if(index == 1){
					uni.navigateTo({
						url: "/pages/index/cityList"
					})
				}else if(index == 2){
					uni.navigateTo({
						url: "/pages/index/citySearch"
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
page{
	background-color: #fff;
}
.city{
	padding: 0 25rpx;
	overflow: hidden;
	&-hd{
		margin-top: 30rpx;
		height: 90rpx;
		background: #F5F5F5;
		border-radius: 90rpx;
		border: 1px solid #EAEAEA;
		padding: 0 30rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		.a{
			font-weight: 500;
			font-size: 28rpx;
			color: #222222;
			display: flex;
			align-items: center;
			image{
				width: 22rpx;
				height: 22rpx;
				margin-left: 13rpx;
			}
		}
		.b{
			flex: 1;
			font-weight: 500;
			font-size: 28rpx;
			color: #999999;
			margin-left: 50rpx;
		}
	}
	&-bd{
		margin-top: 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-weight: 500;
		font-size: 26rpx;
		color: #222222;
		.fl{
			flex: 1;
			max-width: 500rpx;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
			text{
				color: #999999;
			}
		}
		.fr{
			display: flex;
			align-items: center;
			image{
				width: 30rpx;
				height: 30rpx;
				margin-right: 10rpx;
			}
		}
	}
}
</style>
