Files
vpUni/.svn/pristine/8f/8f9327c2e9835645a4ca33f082c34850066c9d08.svn-base
2026-03-09 16:39:03 +08:00

166 lines
3.2 KiB
Plaintext

<template>
<view class="address-manager">
<!-- 提示信息 -->
<view class="tip-bar">
<u-icon name="info-circle" size="24rpx" class="info-icon"></u-icon>
<text class="tip-text">最多可添加10个收货地址</text>
</view>
<!-- 地址列表 -->
<view class="address-list">
<!-- 地址项1 - 默认地址 -->
<view class="address-item">
<view class="address-content">
<view class="name-phone">
<text class="name">张三</text>
<text class="phone">138****1314</text>
<view class="default-tag">默认</view>
</view>
<text class="address">北京市海淀区中关村科技园区8号楼3单元502室</text>
</view>
<up-icon name="trash" color="#999" size="24"></up-icon>
</view>
</view>
<!-- 新增地址按钮 -->
<view class=""
style=" border-top: 1rpx solid #e2e2e2; position: fixed; bottom: 0; width: 100%; padding: 30rpx 20rpx; background-color: #fff; ">
<up-button @click="Service.GoPage('/pages/userFunc/addAddress')" color='var(--nav-mian)' shape='circle'
style="width: 90%; margin: 15rpx auto 0; " text="新增地址"></up-button>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { Service } from "@/Service/Service"
import { onShow, onLoad } from "@dcloudio/uni-app";
// 地址数据
const addresses = ref([
]);
onLoad(() => {
});
onShow(() => {
});
</script>
<style scoped lang="scss">
.address-manager {
background-color: #f6f6f6;
height: 100vh;
}
/* 提示信息样式 */
.tip-bar {
background-color: #fff8e6;
padding: 20rpx 30rpx;
display: flex;
align-items: center;
.info-icon {
color: #ff9c07;
margin-right: 10rpx;
}
.tip-text {
font-size: 26rpx;
color: #ff9c07;
flex: 1;
}
}
/* 地址列表样式 */
.address-list {
background-color: #fff;
padding: 0 30rpx;
border-top: 1rpx solid #e2e2e2;
border-bottom: 1rpx solid #e2e2e2;
.address-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx 0;
border-bottom: 1rpx solid #fff;
&:last-child {
border-bottom: none;
}
.address-content {
flex: 1;
.name-phone {
display: flex;
align-items: center;
margin-bottom: 10rpx;
.name {
font-size: 28rpx;
color: #333;
font-weight: 500;
margin-right: 20rpx;
}
.phone {
font-size: 26rpx;
color: #666;
margin-right: 15rpx;
}
.default-tag {
background-color: #ff6b00;
color: #fff;
font-size: 20rpx;
padding: 2rpx 15rpx;
border-radius: 20rpx;
}
}
.address {
font-size: 26rpx;
color: #666;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
margin-top: 20rpx;
}
}
.edit-icon {
width: 30rpx;
height: 30rpx;
color: #999;
margin-top: 5rpx;
}
}
}
/* 新增地址按钮样式 */
.add-btn {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #ff6b00;
color: #fff;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0;
}
</style>