Liuyi
2024-09-27 9ac5049e08ba842663761a432b41d36d3d1b2089
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<script setup>
    import { ref ,onMounted } from 'vue'
    const addressList = ref([
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'张大左',phone:'13512334002',address:'重庆 重庆市 北碚区 互联网产业生态园 2-5-1',checked:true,id:'12'},
        {name:'',phone:'',address:'',checked:false,id:''},
        {name:'',phone:'',address:'',checked:false,id:''},
        {name:'',phone:'',address:'',checked:false,id:''},
    ])
    function navTo(){
        let title = '新增地址'
        let id = 0
        uni.navigateTo({
            url:'/pages/addressAdd/index'
        })
    }
</script>
<template>
    <view class="container">
        <navbar title = '地址管理'></navbar>
        <view class="content">
            <view class="main">
                <block v-for="(item,index) in addressList">
                    <view class="address-item">
                        <view class="user-info">
                            <text>{{item.name}}</text>
                            <text>{{item.phone}}</text>
                        </view>
                        <view class="address-info">{{item.address}}</view>
                        <view class="address-divide"></view>
                        <view class="handel">
                            <view class="handel-left">
                                 <radio color = "#4996E3" :value="item.id" :checked="item.checked"></radio>
                                <text>设为默认</text>
                            </view>
                            <view class="handel-right">
                                <view>
                                    <image src="../../static/images/address/edit.png" alt=""></image>
                                    <text>编辑</text>
                                </view>
                                <view>
                                    <image src="../../static/images/address/delete.png" alt=""></image>
                                    <text>删除</text>
                                </view>
                            </view>
                        </view>
                    </view>
                </block>
            </view>
            <view class="subBtn" @click="navTo()">新增收货地址</view>
        </view>
    </view>
</template>
 
<style lang="scss">
    .container{
        width: 100%;
        height: 100vh;
        .content{
            width: 100%;
            height:calc(100vh - 176rpx - 20rpx);
            background:linear-gradient(to top,#FFFFFF,#E8EFFF);
            padding-top:20rpx;
            .main{
                width: 686rpx;
                height:1162rpx;
                margin:0 auto;
                overflow-y: scroll;
                // background-color: #a6ffd3;
                .address-item{
                    width:100%;
                    height:254rpx;
                    padding:20rpx 0 26rpx;
                    box-sizing: border-box;
                    margin-bottom:20rpx;
                    background: #FFFFFF;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    align-items:flex-start;
                    .user-info{
                        width:100%;
                        padding: 0 65rpx;
                        box-sizing: border-box;
                        display: flex;
                        justify-content: space-between;
                        font-weight: 300;
                        font-size: 32rpx;
                        color: #000000;
                    }
                    .address-info{
                        padding: 0 65rpx;
                        box-sizing: border-box;
                        font-weight: 300;
                        font-size: 28rpx;
                        color: #646464;
                    }
                    .address-divide{
                        width: 100%;
                        height: 1rpx;
                        border-bottom:2rpx dashed #D5DDE0;
                    }
                    .handel{
                        width: 100%;
                        padding: 0 65rpx;
                        box-sizing: border-box;
                        display: flex;
                        justify-content: space-between;
                        align-items:flex-start;
                        .handel-left{
                            radio{
                                color: #000000;
                            }
                            text{
                                font-weight: 300;
                                font-size: 32rpx;
                                color: #0088FF;
                                line-height:28rpx;
                            }
                        }
                        .handel-right{
                            width:35%;
                            height:48rpx;
                            display: flex;
                            justify-content:space-between;
                            align-items:center;
                            view{
                                display: flex;
                                align-items:center;
                                image{
                                    width:28rpx;
                                    height:28rpx;
                                    margin-right:10rpx;
                                }
                                text{
                                    font-weight: 300;
                                    font-size: 24rpx;
                                    color: #373737;
                                }
                            }
                        }
                    }
                }
            }
       .subBtn{
           width:686rpx;
           height: 98rpx;
           // margin-top:100rpx;
           padding:0 26rpx;
           box-sizing:border-box;
           background-color:#5EA1FA;
           border-radius:50rpx;
           font-weight: 300;
           font-size: 36rpx;
           color: #FFFFFF;
           line-height:98rpx;
           text-align: center;
           letter-spacing: 2rpx;
           margin: 100rpx auto 0;
       }
       }
   }
</style>