Преглед изворни кода

用户编辑/新增交互修改/首页布局修改

贾宇博 пре 3 недеља
родитељ
комит
30248a10dc

+ 48 - 25
components/Client/new_file.vue

@@ -3,17 +3,20 @@
 		<!-- 服务选择 -->
 		<template v-if="userType == 1">
 			<view class="Wrapper-grid">
-				<up-grid :border="false" col="4" @click="handleGridClick">
-					<up-grid-item v-for="(item, index) in serviceList1" :key="index"
-						:custom-style="{ padding: '20rpx' }">
-						<!-- 图标 -->
-						<image :src="item.icon" class="service-img" mode="aspectFit" />
-
-						<!-- 文本 -->
-						<text class="grid-text">{{ item.name }}</text>
-					</up-grid-item>
-				</up-grid>
-
+				<!-- 横向滚动容器 -->
+				<scroll-view scroll-x class="grid-scroll-view" shows-horizontal-scroll-indicator="false">
+					<up-grid :border="false" col="5" @click="handleGridClick" class="grid-container">
+						<up-grid-item v-for="(item, index) in serviceList1" :key="index"
+							:custom-style="{ padding: '20rpx' }">
+							<!-- 图标 -->
+							<image :src="item.icon" class="service-img" mode="aspectFit" />
+		
+							<!-- 文本 -->
+							<text class="grid-text">{{ item.name }}</text>
+						</up-grid-item>
+					</up-grid>
+				</scroll-view>
+		
 				<up-toast ref="uToastRef" />
 			</view>
 		</template>
@@ -83,40 +86,60 @@
 
 	// 普通用户
 	const serviceList1 = ref([{
-			icon: '/static/img/统一知识平台-营运@1x.png',
-			name: '孩子陪',
+			icon: '/static/Tioimages/1 妇女儿童权益保护服务.png',
+			name: '孩子陪',
 			key: 2,
 		},
 		{
-			icon: '/static/img/编组.png',
-			name: '陪伴陪聊',
+			icon: '/static/Tioimages/家庭保洁.png',//换
+			name: '家庭保洁',
 			key: 1,
 		},
 		{
-			icon: '/static/img/清空.png',
-			name: '家庭助理',
+			icon: '/static/Tioimages/临时帮手.png',
+			name: '临时帮手',
 			key: 3,
 		},
 		{
-			icon: '/static/img/构建.png',
-			name: '健康管理',
+			icon: '/static/Tioimages/专家服务.png',
+			name: '专家服务',
 			key: 4,
 		},
 		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家庭清洁',
+			icon: '/static/Tioimages/家电维修.png',
+			name: '家电维护',
 			key: 5,
 		},
 		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家务帮手',
+			icon: '/static/Tioimages/1v专业指导.png',
+			name: '陪伴陪聊',
 			key: 6,
 		},
 		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '资讯与服务',
+			icon: '/static/Tioimages/旅游服务.png',
+			name: '旅游服务',
 			key: 7,
 		},
+		{
+			icon: '/static/Tioimages/健康管理.png',//换
+			name: '健康管理',
+			key: 8,
+		},
+		{
+			icon: '/static/Tioimages/交友.png',
+			name: '交友专区',
+			key: 9,
+		},
+		{
+			icon: '/static/Tioimages/购物商城.png',
+			name: '商城购物',
+			key: 10,
+		},
+		{
+			icon: '/static/Tioimages/本地生活.png',
+			name: '本地生活',
+			key: 11,
+		},
 	]);
 	
 	//志愿者

Разлика између датотеке није приказан због своје велике величине
+ 4915 - 0
components/pickerAddress/areadata.js


+ 105 - 0
components/pickerAddress/pickerAddress.vue

@@ -0,0 +1,105 @@
+<template>
+	<!-- 地址选择器组件 -->
+	<picker @change="bindPickerChange" @columnchange="columnchange" :range="array" range-key="name" :value="value" mode="multiSelector">
+			<slot></slot>
+	</picker>
+</template>
+
+<script>
+import AllAddress from './areadata.js'
+let selectVal = ['','','']
+export default {
+		data() {
+			return{
+				value: [0,0,0],
+				array: [],
+				index: 0
+			}
+		},
+		props:{
+			selectValue: {
+				type: Array,
+				default: [0,0,0]
+			}
+		},
+		created() {
+			this.value = this.selectValue
+			this.initSelect()
+		},
+		methods:{
+			// 初始化地址选项
+			initSelect() {
+				this.updateSourceDate() // 更新源数据
+				.updateAddressDate() // 更新结果数据
+				.$forceUpdate()  // 触发双向绑定
+			},
+			// 地址控件改变控件
+			columnchange(d) {
+				this.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引
+				.updateSourceDate() // 更新源数据
+				.updateAddressDate() // 更新结果数据
+				.$forceUpdate()  // 触发双向绑定
+			},
+			
+			/**
+			 * 更新源数据
+			 * */
+			updateSourceDate() {
+				// console.log(AllAddress, '>>>>>>>AllAddress');
+				this.array = []
+				this.array[0] = AllAddress.map(obj => {
+					return { name: obj.name }
+				})
+				this.array[1] = AllAddress[this.value[0]].city.map(obj => {
+					return { name: obj.name }
+				})
+				this.array[2] = AllAddress[this.value[0]].city[this.value[1]].area.map(obj => { 
+					return { name: obj }
+				})
+				return this
+			},
+			
+			/**
+			 * 更新索引
+			 * */
+			updateSelectIndex(column, value){
+				let arr = JSON.parse(JSON.stringify(this.value)) 
+				arr[column] = value
+				if(column === 0 ) {
+						arr[1] = 0
+						arr[2] = 0
+				}
+				if(column === 1 ) {
+						arr[2] = 0
+				}
+				this.value = arr
+				return this
+			},
+			
+			/**
+			 * 更新结果数据 
+			 * */
+			updateAddressDate() {
+				selectVal[0] = this.array[0][this.value[0]].name
+				selectVal[1] = this.array[1][this.value[1]].name 
+				selectVal[2] = this.array[2][this.value[2]].name 
+				return this
+			},
+			
+			/**
+			 * 点击确定
+			 * */
+			bindPickerChange(e) {
+				this.$emit('change', {
+					index: this.value,
+					data: selectVal
+				})
+				return this
+			}
+		}
+}
+</script>
+
+<style>
+</style>
+

+ 3 - 3
pages.json

@@ -153,17 +153,17 @@
 				{
 					"path": "pages/setupUser/Address",
 					"style": {
-						"navigationBarTitleText": "设置"
+						"navigationBarTitleText": "新增地址"
 					}
 				},
 				{
-					"path": "selectAddress/index",
+					"path": "pages/selectAddress/index",
 					"style": {
 						"navigationBarTitleText": "服务地址"
 					}
 				},
 				{
-					"path": "selectAddress/edit",
+					"path": "pages/selectAddress/edit",
 					"style": {
 						"navigationBarTitleText": "服务地址修改"
 					}

+ 1 - 0
pages/common/classify/orderlist.vue

@@ -111,6 +111,7 @@ const handlClick = (item) => {
 }
 
 	function onChange(tabItem) {
+		console.log(tabItem,'>>>>>>>>>>>>tabItem')
 		// tab.value = tabItem.value;
 		emits('fetchData', tabItem.value)
 	}

+ 1 - 3
pages_classify/pages/orderItem/orderdetails.vue

@@ -111,11 +111,9 @@
 
 	// 获取传递的参数
 	onLoad(async (options) => {
-		mainOrderId.value = options.mainOrderId; // 存储到响应式变量
+		mainOrderId.value = options.mainOrderId;
 		const res = await orderInfomainOrderId(mainOrderId.value)
 		listData.value = res.data;
-		console.log(listData.value, '获取用户详情')
-
 	});
 </script>
 

+ 85 - 69
pages_home/pages/Volunteerside/goodsDetails.vue

@@ -44,7 +44,7 @@
 
 		</view>
 
-		<!-- 底部弹框 -->
+		<!-- 底部第一层弹框 -->
 		<view>
 			<up-popup :show="show" @close="close" @open="open">
 
@@ -63,7 +63,6 @@
 					<up-avatar :src="src"></up-avatar>
 					<text style="margin-top: 15rpx;">¥{{listData.businessPrice}}</text>
 				</view>
-				<!--  -->
 				<view class="Wrap-info">
 					<text style="margin-left: 10rpx;">服务类别:</text>
 					<up-text type="info" text="家庭教育"></up-text>
@@ -90,10 +89,27 @@
 					<up-button type="error" shape="circle" :customStyle="wrapqx" @click="handleBuy">
 						购买¥{{ computeMoney }}
 					</up-button>
-
 				</view>
 			</up-popup>
 		</view>
+
+
+		<!-- 第二个弹框-->
+		<up-popup v-model:show="showSecond">
+			<view @click="jumpToAddressSelect">
+				<up-cell-group>
+						<up-cell icon="setting-fill" title="请选择服务地址"></up-cell>
+					
+					</up-cell-group>
+			</view>
+			<view class="Wrap-detils-btn">
+				<up-button type="primary" shape="circle" @click="closeSecond">取消</up-button>
+				<up-button type="error" shape="circle" @click="handleSecond">立即预约¥{{ computeMoney }}</up-button>
+			</view>
+		</up-popup>
+
+
+
 		<up-popup v-model:show="showSum">
 			<view class="Wrap-Payment">
 				<!-- 支付金额 -->
@@ -110,7 +126,7 @@
 						<image src="/static/my/钱包.png" class="payment-icon"></image>
 						<text class="option-text">钱包</text>
 					</view>
-					<up-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
+					<up-radio-group v-model="radiovalue1" placement="column">
 						<up-radio :customStyle="{marginLeft: 'auto'}" v-for="(item, index) in radiolist1" :key="index"
 							:label="item.name" :name="item.name"></up-radio>
 					</up-radio-group>
@@ -147,13 +163,11 @@
 				</view>
 			</view>
 		</up-popup>
-		<up-notify message="支付成功" :show="showNotify"></up-notify>
+
 	</view>
 </template>
 
 <script setup>
-	// 点击当前时间,后面时间禁用
-	// workDate获取点击的精确时间
 	import {
 		onLoad
 	} from '@dcloudio/uni-app'
@@ -162,7 +176,7 @@
 		ref,
 		nextTick,
 		reactive,
-		computed
+		computed,
 	} from "vue";
 	import {
 		getDetailsvolunteerId,
@@ -174,7 +188,6 @@
 	import itsCalendar from '@/components/its-calendar/its-calendar.vue';
 	import uniDatetimePickerMy from "@/uni_modules/lic-uni-datetime-picker/components/lic-uni-datetime-picker/lic-uni-datetime-picker.vue"
 
-
 	const src = ref('http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg')
 	const businessPrice = ref() //价格
 	const volunteerId = ref(''); // 存储志愿者ID
@@ -191,53 +204,77 @@
 	const endDisabled = ref('')
 	const time = ref('')
 	const listData = ref({})
-	const show = ref(false); //立即购买
+	const show = ref(false); //第一层弹框
+	const showSecond = ref(false) //第二层弹框
+	const showThird = ref(false) //第二层弹框
 	const showSum = ref(false);
 	const showNotify = ref(false) //支付成功提示
 	const remark = ref('') //备注
+	const radiovalue1 = ref('苹果');
+	// Radio 单选框数据
+	const radiolist1 = reactive([{
+			name: '',
+			disabled: false,
+		},
 
-	const computeMoney = computed(() => {
-		return totalTimes.value * businessPrice.value
-	})
-
-	const certificationPictures = computed(() => {
-		if (listData.value.certificationPicture) {
-			return listData.value.certificationPicture.split(',')
-		}
-		return []
-	})
+	]);
+	
+	// 详情底部立即购买弹框
+	const buttonClick = (e) => {
+		show.value = true; // 打开弹框
+	};
 
-	// 定义方法  
+	// 第一层弹框
 	function open() {
-		// 打开逻辑,比如设置 show 为 true  
 		show.value = true;
 	}
-
+	// 第一层弹框取消
 	function close() {
 		// 关闭逻辑,设置 show 为 false  
 		show.value = false;
 	}
+	// 第一个弹框逻辑
+	const handleBuy = () => {
+		show.value = false; // 关闭第一个弹框
+		showSecond.value = true; // 打开第二个弹框
+	};
+
+	// 第二层弹框
+	function openSecond() {
+		showSecond.value = true;
+	}
+	// 第二层弹框取消
+	function closeSecond() {
+		// 关闭逻辑,设置 show 为 false  
+		showSecond.value = false;
+		show.value = true; // 打开第一个弹框
+	}
 
-	// 定义方法
+	// 第三层弹框
 	function openSum() {
 		// 打开逻辑,比如设置 show 为 true  
 		showSum.value = true;
 	}
 
 	function closeSum() {
-		// 关闭逻辑,设置 show 为 false  
 		showSum.value = false;
 	}
-	const handleBuy = () => {
-		show.value = false; // 关闭第一个弹框
-		showSum.value = true; // 打开第二个弹框
-	};
+
+
 	const handlCancel = () => {
 		show.value = false; // 关闭第一个弹框
 		selectedTimes.value = []; // 清空已选时间
-		  totalTimes.value = 0;     // 重置点击次数
+		totalTimes.value = 0; // 重置点击次数
+	}
+
+
+	const jumpToAddressSelect = () =>{
+		uni.navigateTo({
+			url:'/pages_mine/pages/selectAddress/index'
+		})
 	}
-	// 底部数据
+
+	// 详情底部底部数据
 	const options = ref([{
 			icon: 'headphones',
 			text: '客服'
@@ -248,48 +285,19 @@
 		},
 	]);
 
-
+	// 详情底部立即购买样式
 	const buttonGroup = ref([{
 		text: '立即购买',
 		backgroundColor: 'red',
 		color: '#fff'
 	}]);
-
-	// 方法
+	// 底部帮助客服方法
 	const onClick = (e) => {
 		uni.showToast({
 			title: `点击${e.content.text}`,
 			icon: 'none'
 		});
 	};
-
-	const buttonClick = (e) => {
-		// console.log(e);
-		// options.value[2].info++;
-		show.value = true; // 打开弹框
-	};
-
-
-	// Radio 单选框数据
-	const radiolist1 = reactive([{
-			name: '',
-			disabled: false,
-		},
-
-	]);
-
-	// up-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
-	const radiovalue1 = ref('苹果');
-
-	const groupChange = (n) => {
-		console.log('groupChange', n);
-	};
-
-	const radioChange = (n) => {
-		console.log('radioChange', n);
-	};
-
-
 	// 修改详情页底部样式
 	const customStyle = {
 		height: '70rpx',
@@ -323,7 +331,6 @@
 		businessPrice.value = listData.value.businessPrice || 0;
 	});
 
-
 	// 选择日期
 	const getListTime = async () => {
 		const params = {
@@ -347,7 +354,6 @@
 		}
 	};
 
-
 	// 获取志愿者排班时间
 	const getByDate = async (date = doorToDoorTimeArr.value[0]) => {
 		// 检查日期是否为空
@@ -408,12 +414,23 @@
 
 	// 立即购买显示时执行
 	const upPopupOpen = () => { //显示时初始化预存储信息数据
-		 selectedTimes.value = [];
-		  totalTimes.value = 0;
-		  currentTime.value = '';
-		  currentDate.value = [];
+		selectedTimes.value = [];
+		totalTimes.value = 0;
+		currentTime.value = '';
+		currentDate.value = [];
 	}
 
+
+	const computeMoney = computed(() => {
+		return totalTimes.value * businessPrice.value
+	})
+
+	const certificationPictures = computed(() => {
+		if (listData.value.certificationPicture) {
+			return listData.value.certificationPicture.split(',')
+		}
+		return []
+	})
 	// 确认购买
 	const handlConfiRmpurchase = async () => {
 		// 定义要发送的数据
@@ -473,7 +490,6 @@
 
 	onMounted(async () => {
 		await getListTime()
-		// getByDate()
 	})
 </script>
 

+ 69 - 35
pages_mine/pages/selectAddress/edit.vue

@@ -57,7 +57,10 @@
 			@close="sexFlag = false"></up-action-sheet>
 		<up-action-sheet :show="labelFlag" :actions="relaTionsHip" @select="sexSelectsHip"
 			@close="labelFlag = false"></up-action-sheet>
-		<up-button type="primary" @click="handleSubmit" text="编辑" style="margin: 30rpx;" />
+		<view class="Wrapper-Btn">
+			<up-button @click="handleQux" type="error" :plain="true" :hairline="true" text="取消" :customStyle="hadlClickEdit"></up-button>
+			<up-button type="error" @click="handleSubmit" text="编辑" :customStyle="hadlClickEdit" />
+		</view>
 	</view>
 </template>
 
@@ -74,34 +77,32 @@
 		useraDdress,
 	} from "@/api/userSettings.js"
 	import pickerAddress from '@/components/pickerAddress/pickerAddress.vue' // 地区选择器组件
+
 	const formRef = ref(null)
 
 	// 获取页面传递的参数
 	// 获取页面传递的参数
 	onLoad((options) => {
-	    console.log(options, '》》》》》》》》》》》》// 检查传递的参数');
-	
-	    // 对每个字段进行解码(如果编码过两次)
-	    if (options) {
-	        options.cityName = decodeURIComponent(decodeURIComponent(options.cityName || ''));
-	        options.districtName = decodeURIComponent(decodeURIComponent(options.districtName || ''));
-	        options.label = decodeURIComponent(decodeURIComponent(options.label || ''));
-	        options.provinceName = decodeURIComponent(decodeURIComponent(options.provinceName || ''));
+		if (options) {
+			options.cityName = decodeURIComponent(decodeURIComponent(options.cityName || ''));
+			options.districtName = decodeURIComponent(decodeURIComponent(options.districtName || ''));
+			options.label = decodeURIComponent(decodeURIComponent(options.label || ''));
+			options.provinceName = decodeURIComponent(decodeURIComponent(options.provinceName || ''));
 			options.name = decodeURIComponent(decodeURIComponent(options.name || ''));
 			options.address = decodeURIComponent(decodeURIComponent(options.address || ''));
 			options.haveContagion = decodeURIComponent(decodeURIComponent(options.haveContagion || ''));
-	        modelForm.value = {
-	            ...modelForm.value,
-	            ...options,
-	            sex: options.sex ? Number(options.sex) : '',
-	            age: options.age ? Number(options.age) : '',
-	            isContagion: options.isContagion ? Number(options.isContagion) : '',
-	            provinceName: options.provinceName || '',
-	            cityName: options.cityName || '',
-	            districtName: options.districtName || '',
-	        };
-	        showContagionContent.value = options.isContagion === 1;
-	    }
+			modelForm.value = {
+				...modelForm.value,
+				...options,
+				sex: options.sex ? Number(options.sex) : '',
+				age: options.age ? Number(options.age) : '',
+				isContagion: options.isContagion ? Number(options.isContagion) : '',
+				provinceName: options.provinceName || '',
+				cityName: options.cityName || '',
+				districtName: options.districtName || '',
+			};
+			showContagionContent.value = options.isContagion === 1;
+		}
 	});
 
 	const modelForm = ref({
@@ -261,29 +262,47 @@
 	// 提交编辑
 	async function handleSubmit() {
 		try {
-			// 验证表单
+			// 1. 验证表单
 			await formRef.value.validate();
 
-			// 准备提交数据
+			// 2. 准备提交数据
 			const submitData = {
 				...modelForm.value,
-				// 确保提交的数据格式正确
 				sex: modelForm.value.sex,
-				isContagion: modelForm.value.isContagion,
-				// 其他需要处理的数据...
+				isContagion: modelForm.value.isContagion
 			};
 
-			// 调用编辑接口
+			// 3. 显示加载中提示(可选)
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			});
+
+			// 4. 调用接口
 			const response = await useraDdress(submitData);
 
-			// 处理响应
+			// 5. 隐藏加载中
+			uni.hideLoading();
+
+			// 6. 处理响应
 			if (response.code === 200) {
-				uni.showToast({
-					title: '编辑成功',
-					icon: 'success'
+				await new Promise((resolve) => {
+					uni.showToast({
+						title: '编辑成功',
+						icon: 'success',
+						duration: 1500, // 默认1500ms
+						mask: true,
+						success: () => {
+							// 等待Toast显示完成
+							setTimeout(() => resolve(), 1500);
+						}
+					});
+				});
+
+				// 7. 跳转页面
+				uni.navigateTo({
+					url:'/pages_mine/pages/selectAddress/index'
 				});
-				// 返回上一页或其他操作
-				uni.navigateBack();
 			} else {
 				uni.showToast({
 					title: response.msg || '编辑失败',
@@ -291,14 +310,29 @@
 				});
 			}
 		} catch (error) {
+			uni.hideLoading();
 			console.error('编辑失败', error);
 			uni.showToast({
-				title: '编辑失败',
+				title: '编辑失败: ' + (error.message || '未知错误'),
 				icon: 'none'
 			});
 		}
 	}
+	const handleQux = () =>{
+		uni.navigateBack({
+			delta:1
+		})
+	}
+	const hadlClickEdit = {
+		width: '240rpx',
+		marginTop: '30rpx'
+	}
 </script>
 
-<style>
+<style scoped>
+	.Wrapper-Btn{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 </style>

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

@@ -1,31 +1,39 @@
 <template>
 	<view class="address-list">
-		<view v-for="(item, index) in dataList" :key="index" class="address-item">
-			<!-- 左侧单选框 -->
-			<view class="radio-group">
-				<up-radio-group v-model="value">
-					<up-radio shape="circle"></up-radio>
-				</up-radio-group>
+		<!-- 上方区域:图片和"新增"文字在右边 -->
+		<view class="header">
+			<view class="add-item" @click="handlHeader">
+				<image src="../../../static/img/新增.png" mode=""></image>
+				<text>新增</text>
 			</view>
+		</view>
 
-			<!-- 中间内容区(自动伸缩) -->
-			<view class="content-wrapper">
-				<view class="address-line">
-					<text class="address-text">
-						{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}
-					</text>
+		<up-radio-group v-model="value">
+			<view v-for="(item, index) in dataList" :key="index" class="address-item">
+				<!-- 左侧单选框 -->
+				<view class="radio-group">
+					<up-radio shape="circle" activeColor="red"></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>
 	</view>
 </template>
 
@@ -61,7 +69,7 @@
 			sex,
 			telephone,
 			haveContagion
-		} = item; 
+		} = item;
 
 		// 手动构建查询参数
 		const params =
@@ -72,7 +80,12 @@
 			url: `/pages_mine/pages/selectAddress/edit?${params}`
 		});
 	};
-
+	
+	const handlHeader = ()=>{
+		uni.navigateTo({
+			url: `/pages_mine/pages/setupUser/Address`
+		});
+	}
 
 	onMounted(() => {
 		getListData()
@@ -84,6 +97,29 @@
 		padding: 20rpx;
 	}
 
+	.header {
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		margin-bottom: 20rpx;
+	}
+
+	.add-item {
+		display: flex;
+		align-items: center;
+	}
+
+	.add-item image {
+		width: 40rpx;
+		height: 40rpx;
+		margin-right: 8rpx;
+	}
+
+	.add-item text {
+		font-size: 25rpx;
+		color: crimson;
+	}
+
 	.address-item {
 		display: flex;
 		align-items: flex-start;
@@ -104,7 +140,7 @@
 
 	.edit-icon {
 		flex-shrink: 0;
-		margin-left: 20rpx;
+		margin-left: 300rpx;
 		padding: 8rpx;
 	}
 
@@ -129,4 +165,4 @@
 		font-size: 28rpx;
 		color: #666;
 	}
-</style>
+</style>

+ 38 - 25
pages_mine/pages/setupUser/Address.vue

@@ -3,8 +3,9 @@
 		<template v-for="(item, index) in addInfoArr" :key="index">
 			<add-component ref="addComponentRef"></add-component>
 		</template>
-		<view>
-			<up-button type="error" text="确定" @click="handlOk" style="Button-btn"></up-button>
+		<view class="Wrapper-Btn">
+			<up-button @click="handleQux" type="error" :plain="true" :hairline="true" text="取消" :customStyle="hadlClickEdit"></up-button>
+			<up-button type="error" text="确定" @click="handlOk" :customStyle="hadlClickEdit"></up-button>
 		</view>
 	</view>
 </template>
@@ -22,44 +23,56 @@
 
 
 	const addComponentRef = ref(null)
-	
-	const addInfoArr = ref([
-		{}
-	])
-	
+
+	const addInfoArr = ref([{}])
+
 	function handleAdd() {
-		if(addInfoArr.value.length < 4 ) addInfoArr.value.push({})
+		if (addInfoArr.value.length < 4) addInfoArr.value.push({})
 	}
 
 
 	const handlOk = async () => {
-		
 		const params = []
 		addInfoArr.value.forEach((item, index) => {
 			params.push(addComponentRef.value[index].modelForm)
 		})
-		
+
 		params.forEach(async (obj) => {
 			const res = await useraDdressData(obj)
-			if(res.code == 200){
+			if (res.code == 200) {
 				wx.showToast({
-				  title: '新增成功',
-				  icon: 'success', // 或者 'none'
-				  duration: 1500, // 显示时间,单位毫秒,默认1500
-				  mask: true, // 是否显示透明蒙层,防止触摸穿透,默认false
+					title: '新增成功',
+					icon: 'success', // 或者 'none'
+					duration: 1500, // 显示时间,单位毫秒,默认1500
+					mask: true, // 是否显示透明蒙层,防止触摸穿透,默认false
 				});
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 2
+					})
+				}, 1500)
 			}
-		})		
+		})
+	}
+	
+	const handleQux = () =>{
+		uni.navigateBack({
+			delta:1
+		})
+	}
+	const hadlClickEdit = {
+		width: '240rpx',
+		marginTop: '30rpx'
 	}
-
 </script>
 <style scoped lang="scss">
+	.address-inp {
+		color: #929292;
+	}
 	
-.address-inp {
-	color: #929292;
-}
-.Button-btn{
-	width: 40rpx;
-	height: 40rpx;
-}
-</style>
+	.Wrapper-Btn{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+</style>

BIN
static/Tioimages/1 妇女儿童权益保护服务.png


BIN
static/Tioimages/1v专业指导.png


BIN
static/Tioimages/专家服务.png


BIN
static/Tioimages/临时帮手.png


BIN
static/Tioimages/交友.png


BIN
static/Tioimages/健康管理.png


BIN
static/Tioimages/发起维修.png


BIN
static/Tioimages/家庭保洁.png


BIN
static/Tioimages/家电维修.png


BIN
static/Tioimages/旅游服务.png


BIN
static/Tioimages/本地生活.png


BIN
static/Tioimages/购物商城.png


BIN
static/img/新增.png