<template>
	<view class="container">
		<view class="courierAddress u-flex-center-sb u-plr30"  @click="chonseAddress">
			<view class="leftAddress u-flex-center">
				<text class="iconfont u-font44 u-02331F">&#xe60c;</text>
				
				<!-- 有地址 -->
				<view class="u-font30 u-ml30 u-999 u-flex-column-start" v-if="value.id">
					<view class="u-flex-center">
						<view class="lname u-font28 u-181818" >
							<text>收货人：</text>
							<text class="u-999">{{value.receiver}}</text>
						</view>
						<text class="u-999 u-ml30" v-if="value.mobile">{{value.mobile}}</text>
						<text class="u-999 u-ml30" v-if="value.phone">{{value.phone}}</text>
					</view>
					<view class="u-font28 u-181818">
						<text>收货地址：</text>
						<text class="u-999">{{value.province_name}}{{value.city_name}}{{value.area_name}}{{value.address}}</text>
					</view>
				</view>
				<!-- 默认没有地址 -->
				<view class="u-font30 u-ml30 u-999" v-else>
					暂无收货地址~
				</view>
			</view>
			<text class="iconfont u-font24 u-CCC u-ml30" v-if="link">&#xe6c7;</text>
		</view>
		
	</view>
</template>

<script>
	export default{
		props:{
			link:{
				type:Boolean,
				default:false
			},
			value:{
				typs:Object,
				default:{}
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			chonseAddress(){
				if(this.link){
					uni.navigateTo({
						url:'/pages/user/address/addressList'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.courierAddress{
		background-color: #fff;
		padding: 36rpx 30rpx;
	}
</style>
