<template>
	<view class="address-box">
		<view style="height: 60px;line-height: 60px;font-size: 18px;font-weight: 700;text-align: center;">
			收货地址
		</view>
		<view class="box1"
			style="margin-bottom: 10px;display: flex;padding: 10px 20px 20px;background: #eee;border-radius: 10px;">
			<view style="flex: 1;">
				<view style="height: 35px;line-height: 35px;display: flex;">
					<text style="font-size: 15px;font-weight: 700;">沁园春第三食堂A20窗口</text>
				</view>
				<view style="color: #777;">
					刘柳柳 18827381928
				</view>
			</view>
			<view
				style="margin-top: 15px;width: 44px;height: 25px;line-height: 25px;text-align: center;border: 1px solid #777;border-radius: 25px;color: #777;">
				编辑
			</view>
		</view>
		<view class="bottom-btn" @tap="$refs.addBookPopup.open('bottom')">
			新增地址
		</view>
		<!-- 新增地址弹出层 -->
		<uni-popup ref="addBookPopup" background-color="#fff">
			<view class="book-popup-content" style="height: 325px;">
				<view style="height: 60px;line-height: 60px;font-size: 18px;font-weight: 700;text-align: center;">
					填写地址
				</view>
				<view class="box1"
					style="margin-bottom: 10px;background: #eee;border-radius: 10px;">
					<uni-data-select v-model="value" :localdata="range" @change="change"></uni-data-select>
				</view>
				<view class="box1"
					style="margin-bottom: 10px;display: flex;padding: 10px;background: #eee;border-radius: 10px;">
					<input type="text" placeholder="请填写详细地址" />
				</view>
				<view class="box1"
					style="margin-bottom: 10px;display: flex;padding: 10px;background: #eee;border-radius: 10px;">
					<input type="text" placeholder="收货人名字" />
				</view>
				<view class="box1"
					style="margin-bottom: 10px;display: flex;padding: 10px;background: #eee;border-radius: 10px;">
					<input type="text" placeholder="联系电话" />
				</view>
				<view class="bottom-btn">
					确认
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selected: 'phone',
				range: [{
					"value": 0,
					"text": "篮球运动"
				}, {
					"value": 1,
					"text": "足球运动",
				}, {
					"value": 2,
					"text": "游泳健身运动"
				}]
			}
		},
		methods: {
			openAddressBook() {
				this.$refs.bookPopup.open('bottom')

			}
		}
	}
</script>

<style lang="scss">
	.address-box {
		height: 600px;
	}

	.bottom-btn {
		width: 90%;
		height: 50px;
		background: linear-gradient(90deg, #e3ff96, #a6ffea);
		font-size: 13px;
		font-weight: 700;
		line-height: 50px;
		text-align: center;
		border-radius: 50px;
		margin: 10px auto;
		position: fixed;
		bottom: 10px;
	}
</style>