<template>
    <view class="container">

        <div class="hasAddress">
            <div class="addressList">
                <div class="addressItem" v-for="item, index in 3" :key="index" :class="{ 'addressItem_def': index == 0 }">
                    <div class="addressItem_top">
                        高世霞 15901518415 <div class="is_def">默认</div>
                    </div>
                    <div class="addressItem_mid">
                        河北 衡水 桃城区 上海公馆 赞寓17层
                    </div>
                    <div class="addressItem_footer">
                        <div class="addressItem_footer_left">
                            <div>
                                <image src="http://192.168.0.172:5500/7.15/shop_checked1.png"></image>
                                设为默认
                            </div>

                            <div v-if="false">
                                <image src="http://192.168.0.172:5500/7.15/shop_checked2.png"></image>
                                已默认
                            </div>

                        </div>
                        <div class="addressItem_footer_right">
                            <div class="btn1" @click="deleteItem">删除</div>
                            <div class="btn2">修改</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="footer">
                <div class="footerBtn" @click="addAddress">新增收货地址</div>
            </div>
        </div>

        <div class="empty" v-if="false">
            <image src="http://192.168.0.172:5500/7.15/shop_noAdd.png"></image>
            <div class="empty_text">暂无收货地址</div>

            <div class="addBtn" @click="addAddress">添加收货地址</div>
        </div>

    </view>
</template>

<script>
import {
    apiArr
} from '../../../api/doorToDoor';
import {
    picUrl,
    menuButtonInfo,
    request,
    NavgateTo
} from '../../../utils';
export default {
    data() {
        return {
            top: "",
            localHeight: "",
            value: 3,
            type: "error",

        }
    },
    methods: {
        addAddress(){
            NavgateTo("../addAddress/index")
        },
        deleteItem(){
            uni.showModal({
                title: '提示',
                content: '是否删除地址',
                success: function (res) {
                    if (res.confirm) {
                        console.log('用户点击确定');
                    } else if (res.cancel) {
                        console.log('用户点击取消');
                    }
                }
            });
        },
    },
    onLoad(options) {
        const meun = menuButtonInfo();
        this.top = meun.top;
        this.localHeight = meun.height;
    },
    onReachBottom() {

    },
}
</script>

<style>
@import url("./index.css");
</style>