<template>
|
<view class="list">
|
<view class="list-item" v-for="(item, index) in list" :key="index">
|
<view class="list-item-left">
|
<view class="list-item-a">
|
<text>李金平</text>
|
<text>18188778293</text>
|
<text>默认</text>
|
</view>
|
<view class="list-item-b">山西省太原市经开区长江东路巴黎春天小区1期4栋302</view>
|
</view>
|
<image src="/static/icon/address_ic_edit@2x.png" mode="widthFix"></image>
|
</view>
|
<view class="button" @click="add">
|
<image src="/static/images/icon_add_dz@2x.png" mode="widthFix"></image>
|
<text>添加收货地址</text>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
list: []
|
};
|
},
|
onLoad(option) {
|
this.getAddr()
|
},
|
methods: {
|
getAddr() {
|
this.$u.api.findListAddr()
|
.then(res => {
|
if (res.code === 200) {
|
this.list = res.data
|
}
|
})
|
},
|
add() {
|
uni.navigateTo({
|
url: '/pages/new-address/new-address'
|
})
|
}
|
}
|
}
|
</script>
|
<style>
|
page {
|
background-color: #FAFAFA;
|
}
|
</style>
|
<style lang="scss" scoped>
|
.list {
|
width: 100%;
|
padding: 20rpx 30rpx;
|
box-sizing: border-box;
|
.button {
|
width: calc(100% - 60rpx);
|
height: 88rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
background: #004096;
|
border-radius: 44rpx;
|
position: fixed;
|
left: 30rpx;
|
bottom: calc(20rpx + env(safe-area-inset-bottom));
|
image {
|
width: 28rpx;
|
height: 28rpx;
|
}
|
text {
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #FFFFFF;
|
}
|
}
|
.list-item {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
background: #FFFFFF;
|
border-radius: 20rpx;
|
margin-bottom: 20rpx;
|
display: flex;
|
align-items: center;
|
&:last-child {
|
margin: 0 !important;
|
}
|
.list-item-left {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
.list-item-a {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-weight: 500;
|
font-size: 28rpx;
|
color: #222222;
|
}
|
&:nth-child(2) {
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #666666;
|
margin-left: 20rpx;
|
}
|
&:nth-child(3) {
|
width: 68rpx;
|
height: 42rpx;
|
line-height: 42rpx;
|
text-align: center;
|
border-radius: 8rpx;
|
border: 1rpx solid #004096;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #004096;
|
margin-left: 20rpx;
|
}
|
}
|
}
|
.list-item-b {
|
width: 100%;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #222222;
|
margin: 24rpx 0;
|
}
|
}
|
image {
|
flex-shrink: 0;
|
width: 40rpx;
|
height: 40rpx;
|
margin-left: 30rpx;
|
}
|
}
|
}
|
</style>
|