<template>
	<view class="content">
		<oct-address
			:isTag="false"
			:lists="addressList"
			:isEdit="false"
			:pattern="true"
			editColor="#34CE98"
			:btnStyle="{'backgroundColor': '#34CE98'}"
			@onAddress="onInfo"
			@onAdd="$Router.push({name: 'AddressEdit'})"
		/>
	</view>
</template>

<script>
export default {
	data() {
		return {
			addressList: [
				{
					name: '唐明明',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: '公司'
				},{
					name: '张静',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: true,
					tag: '家'
				},{
					name: '法外狂徒张三',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: ''
				},{
					name: '王尼玛',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: ''
				},{
					name: '纸巾劳斯',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: ''
				},{
					name: '张同学',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: ''
				},{
					name: '大叔',
					phone: '18245180131',
					city: '黑龙江省哈尔滨市香坊区',
					address: '旭升南街108号',
					default: false,
					tag: ''
				}
			]
		};
	},
	methods: {
		onInfo(val){
			this.$store.commit('setAddress', val)
			this.$Router.back()
		},
		add(){
			console.log("新增地址")
		}
	}
};
</script>

<style lang="scss">
	.content{
		background: #F3F6FB;
		overflow: hidden;
		min-height: 100vh;
	}
</style>
