<template>
  <view class="main">
	<view class="adderss_cont">
		<view class="adderss_item">
			<view class="adderss_name">地址</view>
			<view class="adderss_r ">
				<view class="adderss_text adderss_arr">
					<input class="adderss_input" type="text" placeholder="选择地址"/>
				</view>
			</view>
		</view>
		<view class="adderss_item">
			<view class="adderss_name">门牌号</view>
			<view class="adderss_r ">
				<view class="adderss_text">
					<input class="adderss_input" type="text" placeholder="例:15栋3层301室"/>
				</view>
			</view>
		</view>
		<view class="adderss_item">
			<view class="adderss_name">收货人</view>
			<view class="adderss_r">
				<view class="adderss_text">
					<input class="adderss_input" type="text" placeholder="收货人姓名"/>
				</view>
				<view class="adderss_type">
					<view class="adderss_type_item"><view class="adderss_type_select adderss_acty"><image class="adderss_acty_img" src="../../static/selected.png"></image></view>先生</view>
					<view class="adderss_type_item adderss_type_left"><view class="adderss_type_select"></view>女生</view>
				</view>
			</view>
		</view>
		<view class="adderss_item">
			<view class="adderss_name">手机号</view>
			<view class="adderss_r">
				<view class="adderss_text">
					<input class="adderss_input" type="text" placeholder="收货人手机号"/>
				</view>
			</view>
		</view>
	</view>
	<view class="adderss_cont">
		<view class="adderss_default">
			<view class="adderss_default_l">
				<view class="adderss_default_title">设为默认地址</view>
				<view class="adderss_default_desc">每次下单会默认推荐使用该地址</view>
			</view>
			<view class="adderss_default_switch">
				<switch :checked="isDefault == 1 ? true:false" color="#e61817" @change="switchChange" />
			</view>
		</view>
	</view>
	<view style="height: 200rpx;"></view>
	<view class="footer">
		<view class="footer_btn" @click="save">保存地址</view>
	</view>
  </view>
</template>

<script setup>
import { computed,ref,onMounted,onUnmounted,getCurrentInstance,nextTick } from 'vue';
import { useCounterStore } from '@/store/counter'; // 引入 Pinia Store
import { storeToRefs } from 'pinia';//实现解构付值
import { onLoad,onShow,onPullDownRefresh,onPageScroll,onReachBottom,onReady } from "@dcloudio/uni-app"
const counterStore = useCounterStore(); // 使用 Store
const { proxy } = getCurrentInstance();
//使用pinia：storeToRefs方法包裹(保持响应式更新，不使用视图无法更新)
const {statusHeight,headerHeight,statusBartop } = storeToRefs(counterStore);
const save=()=>{
	uni.navigateBack({
		delta:1
	})
}
onLoad((options) => {});
onShow(() => {});
onReady(()=>{})
onPullDownRefresh(()=>{})
onReachBottom(()=>{})
</script>

<style lang="scss">
	@import './style.scss';
</style>