<template>
	<t-index-address @select="select"></t-index-address>
</template>

<script>
	export default {
		data() {
			return {
				type:''
			}
		},
		onLoad(options) {
			if(options.type=='indent'){
				this.type = options.type
			}
			// 计算出可用高度
			// this.windowHeight = uni.getSystemInfoSync().windowHeight-100+"px";
		},
		methods: {
			// 选中事件
			select(data) {
				if(this.type== 'indent'){
					uni.setStorage({
						key: 'jsCity',
						data: data.name,
						success: function () {
							uni.navigateBack()
						}
					});
				}else{
					uni.setStorage({
						key: 'selectCity',
						data: data.name,
						success: function () {
							uni.navigateBack()
						}
					});
				}
				
			}
		}
	}
</script>

<style>
</style>