jiayubo vor 2 Wochen
Ursprung
Commit
50d1971eb3

+ 1 - 1
manifest.json

@@ -52,7 +52,7 @@
     "mp-weixin" : {
         "appid" : "wxe8a05852410396cf",
         "setting" : {
-            "urlCheck" : false,
+            "urlCheck" : true,
             "postcss" : true,
             "minified" : true
         },

+ 1 - 1
pages/classify.vue

@@ -214,4 +214,4 @@
 			right: 0px;
 		}
 	}
-</style>
+</style>

+ 107 - 44
pages_home/components/volunteerSide/adresss.vue

@@ -1,34 +1,40 @@
 	<template>
 		<view class="box">
-			<!-- <view class="" @click="handleChane">
-				改变
-			</view> -->
-			<up-radio-group v-model="radioValue" @change="handleChane">
-				<view v-for="(item, index) in dataList" :key="index" class="address-item">
-					<!-- 左侧单选框 -->
-					<view class="radio-group">
-						<up-radio shape="circle" activeColor="red" :name="item.addressId"></up-radio>
-					</view>
-
-					<!-- 中间内容区(自动伸缩) -->
-					<view class="content-wrapper">
-						<view class="address-line">
-							<text class="address-text">
-								{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}
-							</text>
+			<view class="address-list">
+				<up-radio-group v-model="radioValue" @change="handleChane">
+					<view v-for="(item, index) in dataList" :key="index" class="address-item">
+						<!-- 左侧单选框 -->
+						<view class="radio-group">
+							<up-radio shape="circle" activeColor="red" :name="item.addressId"></up-radio>
 						</view>
-						<view class="contact-info">
-							<text class="name">{{ item.name }}</text>
-							<text class="phone">{{ item.telephone }}</text>
+
+						<!-- 中间内容区(自动伸缩) -->
+						<view class="content-wrapper">
+							<view class="address-line">
+								<text class="address-text">
+									{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}
+								</text>
+							</view>
+							<view class="contact-info">
+								<text class="name">{{ item.name }}</text>
+								<text class="phone">{{ item.telephone }}</text>
+							</view>
 						</view>
-					</view>
 
-					<!-- 右侧编辑图标(固定宽度) -->
-					<view class="edit-icon" @click="hadlClickTo(item)">
-						<up-icon name="edit-pen" size="16"></up-icon>
+						<!-- 右侧编辑图标(固定宽度) -->
+						<view class="edit-icon" @click="hadlClickTo(item)">
+							<up-icon name="edit-pen" size="16"></up-icon>
+						</view>
 					</view>
-				</view>
-			</up-radio-group>
+				</up-radio-group>
+			</view>
+			<!-- 底部新增按钮 -->
+			<view class="add-bottom-btn" @click="handlHeader">
+			<view class="add-bottom-btn-inner">
+				<text class="plus">+</text>
+				<text>新增收货地址</text>
+			</view>
+		</view>
 		</view>
 	</template>
 
@@ -47,13 +53,19 @@
 		const addressId = ref('')
 		const onLoadOptions = ref({})
 
+		const handleAddAddress = () => {
+			uni.navigateTo({
+				url: '/pages_home/components/volunteerSide/addAddress'
+			})
+  }
+
+  	const handlHeader = () => {
+		uni.navigateTo({
+			url: `/pages_mine/pages/setupUser/Address`
+		});
+	}
+
 
-		const getListData = async () => {
-			const res = await addressList()
-			dataList.value = res.rows
-			total.value = res.total
-		}
-		
 		const props = defineProps({
 			modelValue: {
 				type: Boolean,
@@ -78,6 +90,12 @@
 		onMounted(() => {
 			getListData()
 		})
+
+		const getListData = async () => {
+			const res = await addressList()
+			dataList.value = res.rows
+			total.value = res.total
+		}
 	</script>
 
 	<style lang="scss">
@@ -89,34 +107,48 @@
 			left: 0;
 			z-index: 999999;
 			background: #f0f0f0;
+			display: flex;
+			flex-direction: column;
 		}
 		
-		
 		.address-list {
-			padding: 20rpx;
+			flex: 1;
+			overflow-y: auto;
+			padding: 0 0 120rpx 0;
 		}
 		
-		.header {
+		.footer {
+			position: fixed;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			background: transparent;
 			display: flex;
-			justify-content: flex-end;
+			justify-content: center;
 			align-items: center;
-			margin-bottom: 20rpx;
+			padding-bottom: env(safe-area-inset-bottom);
+			z-index: 1000;
 		}
 		
 		.add-item {
 			display: flex;
 			align-items: center;
-		}
-		
-		.add-item image {
-			width: 40rpx;
-			height: 40rpx;
-			margin-right: 8rpx;
+			justify-content: center;
+			gap: 10rpx;
+			background: #fff;
+			border-radius: 40rpx;
+			box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.06);
+			padding: 0 40rpx;
+			height: 80rpx;
+			margin: 20rpx 0 30rpx 0;
+			font-size: 30rpx;
+			color: #222;
+			font-weight: 500;
 		}
 		
 		.add-item text {
-			font-size: 25rpx;
-			color: crimson;
+			font-size: 30rpx;
+			color: #222;
 		}
 		
 		.address-item {
@@ -124,6 +156,7 @@
 			align-items: flex-start;
 			padding: 24rpx 0;
 			border-bottom: 1rpx solid #f0f0f0;
+			background: transparent;
 		}
 		
 		.radio-group {
@@ -164,4 +197,34 @@
 			font-size: 28rpx;
 			color: #666;
 		}
+
+    .add-bottom-btn {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100vw;
+		background: #fff;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding: 24rpx 0 32rpx 0;
+		z-index: 10;
+		box-shadow: 0 -2rpx 8rpx rgba(0,0,0,0.03);
+	}
+	.add-bottom-btn-inner {
+		display: flex;
+		align-items: center;
+		font-size: 30rpx;
+		color: #222;
+		font-weight: 500;
+		background: #fff;
+		border-radius: 40rpx;
+		padding: 8rpx 32rpx;
+		box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
+	}
+	.add-bottom-btn-inner .plus {
+		font-size: 38rpx;
+		color: #f5b400;
+		margin-right: 12rpx;
+	}
 	</style>

+ 60 - 22
pages_mine/pages/selectAddress/index.vue

@@ -1,39 +1,47 @@
 <template>
 	<view class="address-list">
 		<!-- 上方区域:图片和"新增"文字在右边 -->
-		<view class="header">
+		<!-- <view class="header">
 			<view class="add-item" @click="handlHeader">
 				<image src="../../../static/img/新增.png" mode=""></image>
 				<text>新增</text>
 			</view>
-		</view>
+		</view> -->
 
-		<up-radio-group v-model="radioValue" @change="handleRadioChange">
-			<view v-for="(item, index) in dataList" :key="index" class="address-item">
-				<!-- 左侧单选框 -->
-				<view class="radio-group">
-					<up-radio shape="circle" activeColor="red" :name="item.addressId"></up-radio>
-				</view>
+			<up-radio-group v-model="radioValue" @change="handleRadioChange">
+				<view v-for="(item, index) in dataList" :key="index" class="address-item">
+					<!-- 左侧单选框 -->
+					<view class="radio-group">
+						<up-radio shape="circle" activeColor="red" :name="item.addressId"></up-radio>
+					</view>
 
-				<!-- 中间内容区(自动伸缩) -->
-				<view class="content-wrapper">
-					<view class="address-line">
-						<text class="address-text">
-							{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}
-						</text>
+					<!-- 中间内容区(自动伸缩) -->
+					<view class="content-wrapper">
+						<view class="address-line">
+							<text class="address-text">
+								{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}
+							</text>
+						</view>
+						<view class="contact-info">
+							<text class="name">{{ item.name }}</text>
+							<text class="phone">{{ item.telephone }}</text>
+						</view>
 					</view>
-					<view class="contact-info">
-						<text class="name">{{ item.name }}</text>
-						<text class="phone">{{ item.telephone }}</text>
+
+					<!-- 右侧编辑图标(固定宽度) -->
+					<view class="edit-icon" @click="hadlClickTo(item)">
+						<up-icon name="edit-pen" size="16"></up-icon>
 					</view>
 				</view>
+			</up-radio-group>
 
-				<!-- 右侧编辑图标(固定宽度) -->
-				<view class="edit-icon" @click="hadlClickTo(item)">
-					<up-icon name="edit-pen" size="16"></up-icon>
-				</view>
+		<!-- 新增底部按钮 -->
+		<view class="add-bottom-btn" @click="handlHeader">
+			<view class="add-bottom-btn-inner">
+				<text class="plus">+</text>
+				<text>新增收货地址</text>
 			</view>
-		</up-radio-group>
+		</view>
 	</view>
 </template>
 
@@ -181,4 +189,34 @@
 		font-size: 28rpx;
 		color: #666;
 	}
+
+	.add-bottom-btn {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100vw;
+		background: #fff;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding: 24rpx 0 32rpx 0;
+		z-index: 10;
+		box-shadow: 0 -2rpx 8rpx rgba(0,0,0,0.03);
+	}
+	.add-bottom-btn-inner {
+		display: flex;
+		align-items: center;
+		font-size: 30rpx;
+		color: #222;
+		font-weight: 500;
+		background: #fff;
+		border-radius: 40rpx;
+		padding: 8rpx 32rpx;
+		box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
+	}
+	.add-bottom-btn-inner .plus {
+		font-size: 38rpx;
+		color: #f5b400;
+		margin-right: 12rpx;
+	}
 </style>