2024-12-24 09:34:08 +00:00
|
|
|
<script setup>
|
|
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
|
|
import tab from '@/plugins/tab';
|
|
|
|
|
|
|
|
|
|
const siteList = ref([]);
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getData();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function getData() {
|
|
|
|
|
siteList.value = [
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
name: '游X',
|
|
|
|
|
phone: '183****5523',
|
|
|
|
|
tag: [
|
|
|
|
|
{ tagText: '默认' },
|
|
|
|
|
{ tagText: '家' }
|
|
|
|
|
],
|
|
|
|
|
site: '广东省深圳市宝安区 自由路66号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
name: '李XX',
|
|
|
|
|
phone: '183****5555',
|
|
|
|
|
tag: [
|
|
|
|
|
{ tagText: '公司' }
|
|
|
|
|
],
|
|
|
|
|
site: '广东省深圳市宝安区 翻身路xx号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 3,
|
|
|
|
|
name: '王YY',
|
|
|
|
|
phone: '153****5555',
|
|
|
|
|
tag: [],
|
|
|
|
|
site: '广东省深圳市宝安区 平安路13号'
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toAddSite() {
|
|
|
|
|
tab.navigateTo('/pages_template/pages/address/addSite');
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2023-08-12 15:44:27 +00:00
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="item" v-for="(res, index) in siteList" :key="res.id">
|
|
|
|
|
<view class="top">
|
|
|
|
|
<view class="name">{{ res.name }}</view>
|
|
|
|
|
<view class="phone">{{ res.phone }}</view>
|
|
|
|
|
<view class="tag">
|
2024-12-24 09:34:08 +00:00
|
|
|
<text v-for="(item, index) in res.tag" :key="index" :class="{ red: item.tagText == '默认' }">{{
|
|
|
|
|
item.tagText }}</text>
|
2023-08-12 15:44:27 +00:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
广东省深圳市宝安区 自由路66号
|
|
|
|
|
<u-icon name="edit-pen" :size="40" color="#999999"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="addSite" @tap="toAddSite">
|
|
|
|
|
<view class="add">
|
|
|
|
|
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>新建收货地址
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.item {
|
|
|
|
|
padding: 40rpx 20rpx;
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
.top {
|
|
|
|
|
display: flex;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 34rpx;
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
.phone {
|
|
|
|
|
margin-left: 60rpx;
|
|
|
|
|
}
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
.tag {
|
|
|
|
|
display: flex;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
align-items: center;
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
text {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 60rpx;
|
|
|
|
|
height: 34rpx;
|
|
|
|
|
line-height: 34rpx;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
border-radius: 6rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-left: 30rpx;
|
2024-12-24 09:34:08 +00:00
|
|
|
background-color: rgb(49, 145, 253);
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
2024-12-24 09:34:08 +00:00
|
|
|
|
|
|
|
|
.red {
|
|
|
|
|
background-color: red
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
.bottom {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: #999999;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-24 09:34:08 +00:00
|
|
|
|
2023-08-12 15:44:27 +00:00
|
|
|
.addSite {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
width: 600rpx;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 30rpx;
|
|
|
|
|
left: 80rpx;
|
|
|
|
|
background-color: red;
|
|
|
|
|
border-radius: 60rpx;
|
|
|
|
|
font-size: 30rpx;
|
2024-12-24 09:34:08 +00:00
|
|
|
|
|
|
|
|
.add {
|
2023-08-12 15:44:27 +00:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #ffffff;
|
2024-12-24 09:34:08 +00:00
|
|
|
|
|
|
|
|
.icon {
|
2023-08-12 15:44:27 +00:00
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|