贾宇博 4 weeks ago
parent
commit
cfee28df1c

+ 81 - 81
components/pages/classify/orderlist.vue

@@ -25,8 +25,8 @@
 
 						<!-- 中间信息 -->
 						<view class="item-info">
-							<view class="info-line">姓名:{{ item.name }}</view>
-							<view class="info-line">类别:{{ item.businessTierName }}</view>
+							<view class="info-line">姓名:{{item.name}}</view>
+							<view class="info-line">类别:{{item.orderStatus}}</view>
 							<view class="info-line skill-description">技能介绍:{{ item.skillDescribe }}</view>
 						</view>
 
@@ -91,16 +91,16 @@ const column2 = [{
 ]
 
 
-const props = defineProps({
-	dataList: {
-		typeof: Array,
-		default: () => [],
-	},
-})
+	const props = defineProps({
+		dataList: {
+			typeof: Array,
+			default: () => [],
+		},
+	})
 
-const emits = defineEmits([
-	'fetchData'
-])
+	const emits = defineEmits([
+		'fetchData'
+	])
 
 
 const handlClick = (item) => {
@@ -110,77 +110,77 @@ const handlClick = (item) => {
 	});
 }
 
-function onChange(tabItem) {
-	// tab.value = tabItem.value;
-	emits('fetchData', tabItem.value)
-}
+	function onChange(tabItem) {
+		// tab.value = tabItem.value;
+		emits('fetchData', tabItem.value)
+	}
 </script>
 
 <style scoped>
-.list-item {
-	display: flex;
-	padding: 12px;
-	border-bottom: 1px solid #f5f5f5;
-}
-
-.item-image {
-	width: 60px;
-	height: 60px;
-	border-radius: 8px;
-	margin-right: 12px;
-}
-
-.item-info {
-	flex: 1;
-	margin-right: 12px;
-	overflow: hidden;
-}
-
-.info-line {
-	margin-bottom: 6px;
-	font-size: 12px;
-	color: #333;
-}
-
-.skill-description {
-	display: -webkit-box;
-	-webkit-line-clamp: 2;
-	/* 限制两行 */
-	-webkit-box-orient: vertical;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	line-height: 1.4;
-	min-height: 2.8em;
-	/* 两行高度 */
-}
-
-.item-right {
-	width: 120px;
-	display: flex;
-	flex-direction: column;
-	align-items: flex-end;
-}
-
-.rating {
-	font-size: 13px;
-	color: #f39c12;
-	margin-bottom: 6px;
-}
-
-.status-tags {
-	margin-bottom: 6px;
-}
-
-.Wrap-Btn {
-	display: flex;
-	gap: 6px;
-	/* 按钮间距 */
-}
-
-.action-btn {
-	padding: 0 8px;
-	height: 28px;
-	line-height: 28px;
-	font-size: 12px;
-}
+	.list-item {
+		display: flex;
+		padding: 12px;
+		border-bottom: 1px solid #f5f5f5;
+	}
+
+	.item-image {
+		width: 80px;
+		height: 80px;
+		border-radius: 8px;
+		margin-right: 12px;
+	}
+
+	.item-info {
+		flex: 1;
+		margin-right: 12px;
+		overflow: hidden;
+	}
+
+	.info-line {
+		margin-bottom: 6px;
+		font-size: 14px;
+		color: #333;
+	}
+
+	.skill-description {
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		/* 限制两行 */
+		-webkit-box-orient: vertical;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		line-height: 1.4;
+		min-height: 2.8em;
+		/* 两行高度 */
+	}
+
+	.item-right {
+		width: 120px;
+		display: flex;
+		flex-direction: column;
+		align-items: flex-end;
+	}
+
+	.rating {
+		font-size: 13px;
+		color: #f39c12;
+		margin-bottom: 6px;
+	}
+
+	.status-tags {
+		margin-bottom: 6px;
+	}
+
+	.Wrap-Btn {
+		display: flex;
+		gap: 6px;
+		/* 按钮间距 */
+	}
+
+	.action-btn {
+		padding: 0 8px;
+		height: 28px;
+		line-height: 28px;
+		font-size: 12px;
+	}
 </style>

+ 1 - 1
config.js

@@ -3,7 +3,7 @@ const config = {
 	// baseUrl: 'https://vue.ruoyi.vip/prod-api',
 	//cloud后台网关地址
 	// baseUrl: 'http://192.168.10.3:8080',
-	baseUrl: 'http://192.168.100.121:9527',
+	baseUrl: 'http://192.168.100.104:9527',
 	// 应用信息
 	appInfo: {
 		// 应用名称

+ 1 - 2
pages/Volunteerside/Side_index.vue

@@ -20,7 +20,6 @@
 					</view>
 				</view>
 			</template>
-
 			<template #right :rightList="rightList">
 				<view class="demo-warter" v-for="(item, index) in rightList" :key="index" @click="goToDetail(item)">
 					<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
@@ -197,4 +196,4 @@
 		max-width: 120rpx;
 		/* 6个中文字符大约占120rpx */
 	}
-</style>
+</style>

+ 48 - 16
pages/goodsDetails/goodsDetails.vue

@@ -80,7 +80,7 @@
 
 				<view class="Wrap-content6">
 					<text style="margin-left: 15rpx;">备注:</text>
-					<up-input placeholder="请输入内容" border="surround" v-model="skillDescribe" @change="change"></up-input>
+					<up-input placeholder="请输入内容" border="surround" v-model="remark" @change="change"></up-input>
 				</view>
 				<view class="Wrap-detils-btn">
 					<up-button type="primary" shape="circle" :customStyle="wrapqx" @click="handlCancel">取消</up-button>
@@ -182,6 +182,7 @@
 	const timeHostArr = ref([]) // 时间段数组
 	const currentDate = ref([]) // 点击过的年月日数组数据
 	const currentTime = ref('') // 最后一次点击时间的时间节点
+	const selectedTimes = ref([]) // 存储所有选择的时间对象
 	const totalTimes = ref(0) // 时间点 点击的次数
 	const startDisabled = ref('')
 	const endDisabled = ref('')
@@ -190,7 +191,7 @@
 	const show = ref(false); //立即购买
 	const showSum = ref(false);
 	const showNotify = ref(false) //支付成功提示
-	const skillDescribe = ref('') //备注
+	const remark = ref('') //备注
 
 	const computeMoney = computed(() => {
 		return totalTimes.value * onePrice.value
@@ -370,11 +371,36 @@
 	};
 
 	// 点击具体时间触发
+	// const getByTime = (timeObj) => {
+	// 	 // 检查 timeObj 是否已经被点击过
+	// 	    if (timeObj.clicked) {
+	// 	        console.log('>>>>>> 已经点击过此时间');
+	// 	        return;  // 如果已经点击过,就直接返回,后续操作不执行
+	// 	    }
+	// 	console.log('>>>>>>触发111');
+	// 	currentDate.value.push(timeObj.yearToDate)
+	// 	currentTime.value = timeObj.hours
+	// 	totalTimes.value += 1 // 记录点击次数
+	// 	  // 标记该时间已点击
+	// 	    timeObj.clicked = true;
+	// }
 	const getByTime = (timeObj) => {
-		console.log('>>>>>>触发111');
-		currentDate.value.push(timeObj.yearToDate)
-		currentTime.value = timeObj.hours
-		totalTimes.value += 1 // 记录点击次数
+	  if (timeObj.clicked) {
+	    console.log('>>>>>> 已经点击过此时间');
+	    return;
+	  }
+	  
+	  // 标记为已点击
+	  timeObj.clicked = true;
+	  
+	  // 添加到已选时间数组
+	  selectedTimes.value.push({
+	    date: timeObj.yearToDate,
+	    time: timeObj.hours,
+	    timestamp: timeObj.timeStamp
+	  });
+	  
+	  totalTimes.value = selectedTimes.value.length; // 更新点击次数
 	}
 
 	// 立即购买显示时执行
@@ -398,9 +424,8 @@
 				serviceDuration: 4,
 				paymentMethod: 1,
 				addressId: 7,
-				remark: "我是图图小淘气,面对世界很好奇!",
 				volunteerId: volunteerId.value,
-				skillDescribe: skillDescribe.value
+				remark: remark.value
 			},
 			workDateList: [
 				// {
@@ -410,14 +435,21 @@
 		};
 
 
-		currentDate.value.length && (new Set(currentDate.value)).forEach((item) => {
-			orderData.workDateList.push({
-				workDate: item,
-				workStartTime: currentTime.value,
-			})
-		})
-
-
+		// currentDate.value.length && (new Set(currentDate.value)).forEach((item) => {
+		// 	orderData.workDateList.push({
+		// 		workDate: item,
+		// 		workStartTime: currentTime.value,
+		// 	})
+		// })
+		// 转换所有选择的时间
+		  selectedTimes.value.forEach(item => {
+		    orderData.workDateList.push({
+		      workDate: item.date,
+		      workStartTime: item.time
+		    });
+		  });
+		
+		
 
 
 		try {

+ 443 - 314
pages/mine.vue

@@ -1,25 +1,48 @@
 <template>
-	<view class="mine-container">
-
-		<view class="mine-header">
-			<img :src="userInfo.avatar" alt="" style="width: 136rpx;height: 136rpx;">
-			<view class="header-info">
-				<text class="info-name">{{ userInfo.nickName }}</text>
-				<text class="info-id">ID: {{ data.volunteerId }}</text>
-				<text class="info-edit" @click="handLsetTing"  v-if="userType == 1">设置> </text>
+	<view class="mine-container" :style="{ height: `${windowHeight}px` }">
+		<view class="mine-top-bgc"></view>
+		<view class="mine-box">
+			<view class="mine-user">
+				<view class="user-name-box">
+					<view class="user-avatar">
+						<up-avatar :src="userInfo.avatar" shape="square"></up-avatar>
+					</view>
+					<view class="user-name">{{ userInfo.nickName }}</view>
+					<view class="grid-box" v-for="(listItem, listIndex) in setTing" :key="listIndex">
+						<!-- <up-badge :isDot="true" type="success" class="item-badge"></up-badge> -->
+						<up-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="listItem.iconName" :size="22"
+							@click="handLsetTing"></up-icon>
+						<text class="grid-text">{{ listItem.name }}</text>
+
+					</view>
+				</view>
+				<up-divider></up-divider>
+				<view class="service-list">
+					<up-grid :border="false" col="4">
+						<up-grid-item v-for="(listItem, listIndex) in serviceList" :key="listIndex"
+							@click="onClick(listItem)">
+							<view class="grid-box">
+								<!-- <up-badge :isDot="true" type="success" class="item-badge"></up-badge> -->
+								<up-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="listItem.iconName"
+									:size="22"></up-icon>
+								<text class="grid-text">{{ listItem.name }}</text>
+							</view>
+						</up-grid-item>
+					</up-grid>
+				</view>
 			</view>
 		</view>
 
 		<view class="list-box">
 			<view class="mine-card price-card" v-if="userType == 2">
 				<view v-for="(item, index) in priceList" :key="item.key" class="price-item"
-					:style="{ alignItems: index === 0 ? 'flex-start' : 'flex-end' }" @click="onClick(item)">
+					:style="{ alignItems: index === 0 ? 'flex-start' : 'flex-end' }">
 					<view class="price-name flex-center"> {{ item.name }} </view>
 					<view class="price-data flex-center">
 						{{ index === 0 ? '¥' : '' }}<up-count-to :startVal="0" :endVal="data[item.key]"
 							:decimals="item.decimals"></up-count-to>
 					</view>
-					<text class="grid-min-price" v-if="item.key === 'balance'">待入账 ¥{{ data[item.balance] }}</text>
+					<text class="grid-min-price" v-if="item.key === 'balance'">待入账 ¥{{ data[item.key] }}</text>
 				</view>
 			</view>
 
@@ -72,293 +95,281 @@
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue';
-import {
-	onLoad,
-	onShow
-} from '@dcloudio/uni-app';
-import store from "@/store"
-import { getVolunteerAccountInfo,volunteerOrderStatistics } from "@/api/mine";
-
-const userInfo = ref({
-	avatar: '/static/serverImg/mine/user.png'
-})
-
-const rateValue = ref(3)
-const priceList = [{
-	name: '账户余额',
-	key: 'balance',
-	decimals: 2,
-	balance:'orderFrozenBalance',
-	page: '/pages_mine/pages/wallet/index'
-},
-{
-	name: '订单总数',
-	key: 'orderCount',
-	decimals: 0
-}
-]
-const orderList = ref([{
-	name: '预约单',
-	key: 'reservationCount'
-},
-
-{
-	name: '进行单',
-	key: 'doingCount'
-
-},
-{
-	name: '完成单',
-	key: 'finishedCount'
-
-},
-{
-	name: '取消单',
-	key: 'cancelCount'
-
-}
-]);
-const data = ref({
-	balance: 0.0,
-	reservationCount: 0,
-	doingCount:0,
-	finishedCount:0,
-	cancelCount:0,
-	orderCount:0,
-});
-
-const userType = uni.getStorageSync('userType') //读取本地存储
-
-const adminList = ref(
-	[
-	// 	{
-	// 	name: '待服务',
-	// 	iconName: '/static/serverImg/mine/icon1.png',
-	// 	page: '/pages/classify',
-	// 	value: 1
-	// },
-	// {
-	// 	name: '进行中',
-	// 	iconName: '/static/serverImg/mine/icon2.png',
-	// 	page: '/pages/classify',
-	// 	value: 2
-	// },
-	// {
-	// 	name: '已完成',
-	// 	iconName: '/static/serverImg/mine/icon3.png',
-	// 	page: '/pages/classify',
-	// 	value: 3
-	// },
-	{
-		name: '差评申述',
-		iconName: '/static/serverImg/mine/icon4.png',
-		page: '/pages_mine/pages/bad/index'
-	},
-	// {
-	// 	name: '钱包',
-	// 	iconName: '/static/serverImg/mine/icon5.png',
-	// 	page: '/pages_mine/pages/wallet/index'
-	// },
-	{
-		name: '帮助与客服',
-		iconName: '/static/serverImg/mine/icon6.png',
-	},
-	{
-		name: '用户端',
-		iconName: '/static/serverImg/mine/icon6.png',
-	},
+	import {
+		onMounted,
+		ref
+	} from 'vue';
+	import {
+		getVolunteerAccount
+	} from '@/api/volunteer.js'
+	import {
+		onLoad,
+		onShow
+	} from '@dcloudio/uni-app';
+	import store from "@/store"
+	const userType = uni.getStorageSync('userType') //读取本地存储
+
+	// 用户/志愿者 识别标识
+	const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
+
+	const userInfo = ref({});
+
+	const setTing = ref(
+		[{
+			iconName: 'setting-fill',
+			value: 1,
+		}, ]);
+
+	const serviceList = ref(
+		[{
+				name: '待服务',
+				iconName: 'clock',
+				page: '/pages/classify',
+				value: 1
+			},
+			{
+				name: '进行中',
+				iconName: 'car',
+				page: '/pages/classify',
+				value: 2
+			},
+			{
+				name: '已完成',
+				iconName: 'car-fill',
+				page: '/pages/classify',
+				value: 3
+			},
+			{
+				name: '差评申述',
+				iconName: 'edit-pen',
+				page: '/pages_mine/pages/bad/index'
+			},
+			{
+				name: '钱包',
+				iconName: 'rmb-circle',
+				page: '/pages_mine/pages/wallet/index'
+			},
+			{
+				name: '帮助与客服',
+				iconName: 'kefu-ermai',
+			},
+			{
+				name: '服务地址',
+				iconName: 'map',
+				page: '/pages_mine/pages/serviceInforMation/index'
+			},
+		]);
+
+
+
+
+	const serviceList2 = ref([{
+			name: '待服务',
+			iconName: 'clock',
+			page: '/pages/classify',
+			value: 1
+		},
+
+		{
+			name: '进行中',
+			iconName: 'car',
+			page: '/pages/classify',
+			value: 2
+		},
+		{
+			name: '已完成',
+			iconName: 'car-fill',
+			page: '/pages/classify',
+			value: 3
+		},
+		{
+			name: '评论',
+			iconName: 'edit-pen',
+			// page: '/pages/myCenter/bad'
+		},
+		{
+			name: '钱包',
+			iconName: 'rmb-circle',
+			page: '/pages_mine/pages/wallet/index'
+		},
+		{
+			name: '帮助与客服',
+			iconName: 'kefu-ermai',
+		},
+		{
+			name: '浏览记录',
+			iconName: 'eye',
+			page: '/pages_mine/pages/wallet/index'
+		},
+		{
+			name: '收藏',
+			iconName: 'star',
+		},
 	]);
-const userList = ref(
-	[{
-		name: '待服务',
-		iconName: 'clock',
-		page: '/pages/classify',
-		value: 1
-	},
-	{
-		name: '进行中',
-		iconName: 'car',
-		page: '/pages/classify',
-		value: 2
-	},
-	{
-		name: '已完成',
-		iconName: 'car-fill',
-		page: '/pages/classify',
-		value: 3
-	},
-	{
-		name: '评论',
-		iconName: 'edit-pen',
-	},
-	{
-		name: '钱包',
-		iconName: 'rmb-circle',
-		page: '/pages_mine/pages/wallet/index'
-	},
-	{
-		name: '浏览记录',
-		iconName: 'eye',
-	},
-	{
-		name: '收藏',
-		iconName: 'star',
-	},
-	{
-		name: '帮助与客服',
-		iconName: 'kefu-ermai',
-	},
-	{
-		name: '地址',
-		iconName: 'kefu-ermai',
-	},
-	{
-		name: '志愿者',
-		iconName: 'kefu-ermai',
-	},
+
+	const priceList = [{
+			name: '余额',
+			key: 'balance',
+			decimals: 2
+		},
+		{
+			name: '订单总数',
+			key: 'orderCount',
+			decimals: 0
+		}
+	]
+
+
+
+	const orderList = ref([{
+			name: '预约单',
+			key: 'orderCount'
+		},
+
+		{
+			name: '进行单',
+			key: 'orderCount'
+
+		},
+		{
+			name: '完成单',
+			key: 'orderCount'
+
+		},
+		{
+			name: '取消单',
+			key: 'orderCount'
+
+		}
 	]);
 
+	const avatarSrc = ref('/static/my/客服.png');
+	const data = ref({
+		balance: 0.0,
+		orderCount: 0,
+	});
+	const rateValue = ref(3);
+	const onClick = (record) => {
+		console.log('record', record, record.page);
+		if (record.page && record.value) {
+			const app = getApp();
+			app.globalData.switchTabParams = {
+				tabKey: record.value
+			};
+			// JS跳转 
+			uni.switchTab({
+				url: record.page
+			});
+			return;
+		}
+		if (record.page) {
+			uni.navigateTo({
+				url: record.page
+			});
+		}
 
-const onClick = (record) => {
-	console.log('record', record, record.page);
-	if(record.page){
-		uni.navigateTo({
-			url: record.page
-		})
+		onMounted(getDetails)
 	}
-	// if (record.page && record.value) {
-	// 	const app = getApp();
-	// 	app.globalData.switchTabParams = {
-	// 		tabKey: record.value
-	// 	};
-	// 	// JS跳转 
-	// 	uni.switchTab({
-	// 		url: record.page
-	// 	});
-	// 	return;
-	// }
-}
 
+	const getDetails = async () => {
+		try {
+			// const res = await getVolunteerAccount();
+			// console.log('res',res);
 
+		} catch (error) {
+			console.log('error', error);
+
+		}
+	}
 
-const getDetails = async () => {
-	try {
-		// const res = await getVolunteerAccount();
-		// console.log('res',res);
 
-	} catch (error) {
-		console.log('error', error);
 
+	const geUserInfo = () => {
+		console.log(store.state, '>>>>99');
+		userInfo.value = store.state.user
 	}
-}
 
-const handLsetTing = () => {
+	// 设置
+	const handLsetTing = () => {
 		console.log('123')
 		uni.navigateTo({
 			url: '/pages_mine/pages/setupUser/index'
 		})
 	}
+	onShow(() => {
+		geUserInfo();
 
+	})
+</script>
 
+<style lang="scss" scoped>
+	.mine-card {
+		border-radius: 8px;
+		background: rgba(255, 255, 255, 1);
+		padding: 12px;
+		margin-bottom: 12px;
+	}
 
-const geUserInfo = () => {
-	console.log(store.state, '>>>>99');
-	// userInfo.value = store.state.user
-	store.dispatch('GetInfo').then((res) => {
-		userInfo.value = store.state.user
-		console.log(store.state.user, '>>>>99');
-		
-		
+	.mine-container {
+		position: fixed;
+		top: 0px;
+		left: 0px;
+		right: 0px;
+		bottom: 0px;
+		background: rgba(245, 245, 245, 1);
+
+		.mine-top-bgc {
+			height: 120px;
+			background: linear-gradient(180deg, rgba(255, 219, 171, 1) 0%, rgba(242, 151, 99, 1) 100%);
 
-	});
-}
-
-onShow(() => {
-	geUserInfo();
-	init();
-})
-
-const init = async() => {
-	try {
-		uni.showLoading({
-			title: '数据加载中...'
-		});
-
-		if(userType === 2){
-			const res1 = await getVolunteerAccountInfo();
-			const res2 = await volunteerOrderStatistics();
-			data.value = {
-				...res1.data,
-				...res2.data
-			}
-			console.log(11,res1,res2,data.value);
-			
 		}
-	} catch (error) {
-		console.log('error', error);
-		uni.showToast({
-			title: error.msg,
-			icon: 'error',
-		});
-	} finally {
-		uni.hideLoading();
-	}
-}
 
+		.mine-box {
+			position: absolute;
+			top: 40px;
+			left: 12px;
+			right: 12px;
+			bottom: 0px;
+			overflow-y: auto;
 
-</script>
 
-<style lang="scss" scoped>
-.mine-container {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	background: rgba(245, 245, 245, 1);
-	overflow-y: auto;
-
-	.mine-header {
-		padding: 42rpx 44rpx;
-		background: #fff;
-		display: flex;
-
-		.header-info {
-			display: flex;
-			flex-direction: column;
-			margin-left: 36rpx;
+			.mine-user {
+				border-radius: 8px;
+				background: rgba(255, 255, 255, 1);
+				margin-bottom: 12px;
 
-			.info-name {
-				font-size: 36rpx;
-				font-weight: 400;
-				line-height: 54rpx;
-				color: rgba(51, 51, 51, 1);
-			}
+				.user-name-box {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 12px 12px 0;
 
-			.info-id {
-				font-size: 28rpx;
-				font-weight: 400;
-				letter-spacing: 0rpx;
-				line-height: 42rpx;
-				color: rgba(153, 153, 153, 1);
-			}
+					.user-avatar {}
 
-			.info-edit {
-				font-size: 24rpx;
-				font-weight: 400;
-				letter-spacing: 0rpx;
-				line-height: 36rpx;
-				color: #3366ff;
+					.user-name {
+						font-size: 18px;
+						font-weight: 700;
+						line-height: 21.09px;
+						color: rgba(51, 51, 51, 1);
+						margin-left: 12px;
+					}
+				}
 			}
 		}
 
+		.service-img {
+			width: 60rpx;
+			height: 60rpx;
+			margin-bottom: 10rpx;
+		}
+
 	}
 
 	.list-box {
 		padding: 16rpx 40rpx;
 
-		.price-card {
+
+		.grid-box {
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
@@ -368,25 +379,90 @@ const init = async() => {
 				align-items: center;
 				flex-direction: column;
 
-				.price-name {
-					font-size: 28rpx;
-					font-weight: 400;
-					line-height: 42rpx;
-					color: rgba(102, 102, 102, 1);
-				}
+				.user-name-box {
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
 
-				.price-data {
-					font-size: 48rpx;
-					font-weight: 400;
-					line-height: 72rpx;
-					color: rgba(51, 51, 51, 1);
+					padding: 12px 12px 0;
+
+					.user-avatar {}
+
+					.user-name {
+						font-size: 18px;
+						font-weight: 700;
+						line-height: 21.09px;
+						color: rgba(51, 51, 51, 1);
+						margin-left: 12px;
+					}
 				}
+			}
+		}
 
-				.grid-min-price {
-					font-size: 24rpx;
-					font-weight: 400;
-					line-height: 36rpx;
-					color: rgba(153, 153, 153, 1);
+		.service-img {
+			width: 60rpx;
+			height: 60rpx;
+			margin-bottom: 10rpx;
+		}
+
+		.service-list {
+			padding-bottom: 12px;
+		}
+
+		.grid-text {
+			font-size: 14px;
+			color: #909399;
+			padding: 10rpx 0 20rpx 0rpx;
+			/* #ifndef APP-PLUS */
+			box-sizing: border-box;
+			/* #endif */
+		}
+
+
+		.grid-box {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			position: relative;
+
+			.item-badge {
+				position: absolute;
+			}
+		}
+
+		.price-box {
+			display: flex;
+			align-content: center;
+			justify-content: space-between;
+			// padding: 12px;
+
+			.price-item {
+				width: 50%;
+				padding: 12px;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+
+				.user-name-box {
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+
+					padding: 12px 12px 0;
+
+					.user-avatar {}
+
+					.user-name {
+						font-size: 18px;
+						font-weight: 700;
+						line-height: 21.09px;
+						color: rgba(51, 51, 51, 1);
+						margin-left: 12px;
+					}
 				}
 			}
 		}
@@ -460,35 +536,105 @@ const init = async() => {
 
 
 			}
-		}
 
-		.status-card {
-			display: grid;
-			grid-template-columns: repeat(3, 1fr);
-			gap: 48rpx;
+			.service-list {
+				padding-bottom: 12px;
+			}
+
+			.grid-text {
+				font-size: 14px;
+				color: #909399;
+				padding: 10rpx 0 20rpx 0rpx;
+				/* #ifndef APP-PLUS */
+				box-sizing: border-box;
+				/* #endif */
+			}
 
-			/* 网格项之间的间距 */
-			.status-card-item {
+			.grid-box {
 				display: flex;
 				align-items: center;
 				justify-content: center;
 				flex-direction: column;
+				position: relative;
 
-				.grid-img-box {
-					padding: 35rpx;
-					border-radius: 50%;
-					background: rgba(249, 250, 251, 1);
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					margin-bottom: 18rpx;
+				.item-badge {
+					position: absolute;
 				}
 
-				.grid-text {
-					font-size: 28rpx;
-					font-weight: 400;
-					line-height: 42rpx;
-					color: rgba(51, 51, 51, 1);
+
+			}
+
+			.price-box {
+				display: flex;
+				align-content: center;
+				justify-content: space-between;
+				// padding: 12px;
+
+				.price-item {
+					width: 50%;
+					padding: 12px;
+
+					.price-name {
+						font-size: 16px;
+						font-weight: 700;
+						line-height: 23.17px;
+						color: rgba(51, 51, 51, 1);
+						margin-bottom: 12px;
+					}
+
+					.price-data {
+						font-size: 20px;
+						font-weight: 700;
+						line-height: 23.44px;
+						color: rgba(51, 51, 51, 1);
+					}
+
+					.grid-min-price {
+						font-size: 12px;
+						font-weight: 500;
+						line-height: 17.38px;
+						color: rgba(153, 153, 153, 1);
+						margin-top: 4px;
+					}
+				}
+
+				.price-item:first-child {
+					border-right: 1px solid #dcdfe6;
+
+				}
+
+			}
+
+		}
+
+		.rate-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.rate-left {
+				font-size: 14px;
+				font-weight: 500;
+				letter-spacing: 0px;
+				line-height: 20.27px;
+				color: rgba(0, 0, 0, 1);
+
+				display: flex;
+				align-items: center;
+				justify-content: left;
+
+				flex: 1;
+			}
+
+			.rate-rigth {
+				font-size: 14px;
+				font-weight: 500;
+				letter-spacing: 0px;
+				line-height: 20.27px;
+				color: rgba(0, 0, 0, 1);
+
+				.rate-count {
+					color: rgba(237, 123, 47, 1);
 				}
 			}
 		}
@@ -548,21 +694,4 @@ const init = async() => {
 		}
 
 	}
-}
-
-.mine-card {
-	border-radius: 24rpx;
-	background: rgba(255, 255, 255, 1);
-	box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 4rpx 16rpx rgba(0, 0, 0, 0.05);
-	margin-bottom: 16rpx;
-	padding: 40rpx;
-}
-
-.count-title {
-	font-size: 32rpx;
-	font-weight: 400;
-	line-height: 48rpx;
-	color: rgba(51, 51, 51, 1);
-	margin-bottom: 32rpx;
-}
 </style>

+ 17 - 11
pages_home/pages/client/details.vue

@@ -32,7 +32,8 @@
 			<view v-if="userType == '1'">
 				<up-waterfall v-model="flowList">
 					<template #left :listData="listData">
-						<view class="demo-warter" v-for="(item, index) in listData" :key="index" @click="goToDetail(item)">
+						<view class="demo-warter" v-for="(item, index) in listData" :key="index"
+							@click="goToDetail(item)">
 							<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
 								:index="index"></up-lazy-load>
 							<view class="demo-title">
@@ -46,12 +47,13 @@
 									<image :src="item.volunteerPicture" class="name-image"></image>
 									{{item.name}}
 								</view>
-			
+
 							</view>
 						</view>
 					</template>
 					<template #right :rightList="rightList">
-						<view class="demo-warter" v-for="(item, index) in rightList" :key="index" @click="goToDetail(item)">
+						<view class="demo-warter" v-for="(item, index) in rightList" :key="index"
+							@click="goToDetail(item)">
 							<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
 								:index="index"></up-lazy-load>
 							<view class="demo-title">
@@ -65,7 +67,7 @@
 									<image :src="item.volunteerPicture" class="name-image"></image>
 									{{item.name}}
 								</view>
-			
+
 							</view>
 						</view>
 					</template>
@@ -117,13 +119,13 @@
 	});
 	const currentTabs2 = ref(0)
 	const total = ref(0)
-	
-	
+
+
 	const userType = uni.getStorageSync('userType') //读取本地存储
-	
+
 	// 用户/志愿者 识别标识
 	const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
-	
+
 	// 获取当前路由对象
 	const route = useRoute();
 
@@ -153,9 +155,13 @@
 	}
 
 	const goToDetail = async (item) => {
-		const volunteerId = item.volunteerId;
+		const params = {
+			volunteerId: item.volunteerId, // 获取 volunteerId
+			serviceCategory: item.serviceCategory, // 获取 serviceCategory
+			businessManagementId: item.businessManagementId, //获取 businessManagementId
+		};
 		uni.navigateTo({
-			url: `/pages/goodsDetails/goodsDetails?volunteerId=${volunteerId}`
+			url: `/pages/goodsDetails/goodsDetails?params=${JSON.stringify(params)}`
 		});
 	}
 
@@ -177,7 +183,7 @@
 		list2.value = dataList[0].children
 
 	})
-	
+
 	const getList = async () => {
 		try {
 			const res = await volunteerinfolist();

+ 58 - 71
pages_mine/components/setupUser/Add.vue

@@ -2,7 +2,7 @@
 	<view>
 		<up-form labelPosition="left" :model="modelForm" :rules="rulesForm" ref="formRef">
 			<up-form-item label="姓名" prop="name" borderBottom>
-				<up-input v-model="modelForm.name" border="none"></up-input>
+				<up-input v-model="modelForm.name" border="none" placeholder="请输入姓名"></up-input>
 			</up-form-item>
 			<up-form-item label="性别" prop="sex" borderBottom @click="() => (sexFlag = true)">
 				<up-input v-model="modelForm.sex" disabled disabledColor="#ffffff" placeholder="请选择性别"
@@ -22,29 +22,33 @@
 				<up-input v-model="modelForm.age" border="none"></up-input>
 			</up-form-item>
 			<up-form-item label="手机号" prop="telephone" borderBottom
-				:style="{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }">
-				<up-input v-model="modelForm.telephone" border="none"></up-input>
+				:style="{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }" labelWidth="60">
+				<up-input v-model="modelForm.telephone" border="none" placeholder="请输入手机号"></up-input>
 			</up-form-item>
 
-			<up-form-item label="是否有传染疾病" prop="isContagion" borderBottom>
-				<up-radio-group v-model="modelForm.isContagion" placement="row" @change="groupChange">
-					<up-radio :customStyle="{marginRight: '16px'}" v-for="(item, index) in isContagionOption" :key="index"
-						:label="item.name" :name="item.name" @change="radioChange">
+			<up-form-item label="是否有传染疾病" prop="isContagion" borderBottom labelWidth="240">
+				<up-radio-group v-model="modelForm.isContagion" placement="row">
+					<up-radio :customStyle="{marginRight: '16px'}" v-for="(item, index) in isContagionOption"
+						:key="index" :label="item.name" :name="item.key">
 					</up-radio>
 				</up-radio-group>
 			</up-form-item>
 			<up-form-item label="地区" prop="area" borderBottom @click="()=> addressShow = true">
-				<up-icon name="arrow-right"></up-icon>
-				<pickerAddress @change="addressChange" :selectValue="[ modelForm.area.provinceCode, modelForm.area.cityCode, modelForm.area.areaCode ]">
-					<view class="inp" :class="modelForm.area.province&&modelForm.area.city&&modelForm.area.area?'':'address-inp'">
-						{{modelForm.area.province ? modelForm.area.province:'省'}} / 
-						{{modelForm.area.city ? modelForm.area.city:'市'}} / 
-						{{modelForm.area.area ? modelForm.area.area:'区'}}
+				<pickerAddress @change="addressChange"
+					:selectValue="[ modelForm.provinceCode, modelForm.cityCode, modelForm.districtCode ]">
+					<view class="inp"
+						:class="modelForm.provinceName&&modelForm.cityName&&modelForm.districtName?'':'address-inp'">
+						{{modelForm.provinceName ? modelForm.provinceName:'省'}} /
+						{{modelForm.cityName ? modelForm.cityName:'市'}} /
+						{{modelForm.districtName ? modelForm.districtName:'区'}}
 					</view>
 				</pickerAddress>
+				<template #right>
+					<up-icon name="arrow-right"></up-icon>
+				</template>
 			</up-form-item>
 			<up-form-item label="地址" prop="address" borderBottom>
-				<up-input v-model="modelForm.address" border="none"></up-input>
+				<up-input v-model="modelForm.address" border="none" placeholder="请输入地址"></up-input>
 			</up-form-item>
 		</up-form>
 		<up-action-sheet :show="sexFlag" :actions="sexOptions" @select="sexSelect"
@@ -52,7 +56,6 @@
 		<up-action-sheet :show="labelFlag" :actions="relaTionsHip" @select="sexSelectsHip"
 			@close="labelFlag = false"></up-action-sheet>
 	</view>
-	
 </template>
 
 <script setup>
@@ -61,7 +64,6 @@
 		reactive
 	} from 'vue';
 	import pickerAddress from '@/components/pickerAddress/pickerAddress.vue' // 地区选择器组件
-	
 	const formRef = ref(null)
 	const modelForm = ref({
 		name: '',
@@ -70,17 +72,19 @@
 		age: '',
 		telephone: '',
 		isContagion: '',
-		area: { // xxxxCode 储存所在数据下标,用来映射回显数据
-			province: '', // 省
-			provinceCode: 0,
-			city: '', // 市
-			cityCode: 0,
-			area: '', // 区
-			areaCode: 0
-		},
+
+		provinceName: '', // 省
+		provinceCode: 0,
+
+		cityName: '', // 市
+		cityCode: 0,
+
+		districtName: '',
+		districtCode: 0,
+
 		address: ''
 	})
-	
+	// 回显把provinceName,cityName,districtName字段拼接
 	const rulesForm = ref({
 		name: {
 			type: 'string',
@@ -107,26 +111,23 @@
 			trigger: ['blur', 'change'],
 		},
 		telephone: {
-				type: 'string',
-				required: true,
-				message: '请填写手机号',
-				trigger: ['blur', 'change'],
-			},
+			type: 'string',
+			required: true,
+			message: '请填写手机号',
+			trigger: ['blur', 'change'],
+		},
 	})
-	
+
 	let sexFlag = ref(false)
 	let labelFlag = ref(false)
 	let addressShow = ref(false)
-	
-	const sexOptions = ref([
-		{
-			name: '男'
-		}, {
-			name: '女'
-		},
-	]);
-	const isContagionOption = ref([
-		{
+
+	const sexOptions = ref([{
+		name: '男'
+	}, {
+		name: '女'
+	}, ]);
+	const isContagionOption = ref([{
 			name: '是',
 			key: 1,
 			disabled: false,
@@ -137,8 +138,7 @@
 			disabled: false,
 		}
 	])
-	const relaTionsHip = ref([
-		{
+	const relaTionsHip = ref([{
 			name: '父母'
 		}, {
 			name: '子女'
@@ -159,53 +159,40 @@
 			name: '配偶'
 		}
 	]);
-	
-	
-	function groupChange (n) {
-		console.log('groupChange', n);
-		
-	}
-	
-	function radioChange (n) {
-		console.log('radioChange', n);
-	}
-	
+
+
 	function sexSelect(e) {
 		modelForm.value.sex = e.name;
 		sexFlag.value = false;
 	}
-	
 	function sexSelectsHip(e) {
 		modelForm.value.label = e.name;
 		labelFlag.value = false;
 	}
-	
+
 	function addressChange(data) {
-		
+
 		console.log(data, '>>>>data');
-		
-		let { data:date, index } = data
-		modelForm.value.area.province = date[0]
-		modelForm.value.area.provinceCode = index[0]
-		
-		modelForm.value.area.city = date[1]
-		modelForm.value.area.cityCode = index[1]
-		
-		modelForm.value.area.area = date[2]
-		modelForm.value.area.areaCode = index[2]
-		
+
+		modelForm.value.provinceName = date[0]
+		modelForm.value.provinceCode = index[0]
+
+		modelForm.value.cityName = date[1]
+		modelForm.value.cityCode = index[1]
+
+		modelForm.value.districtName = date[2]
+		modelForm.value.districtCode = index[2]
+
 	}
-	
+
 	// 预留校验函数
 	function handleVerify() {
 		// formRef.value
 	}
-	
 	defineExpose({
 		modelForm: modelForm.value,
 		handleVerify: handleVerify()
 	})
-	
 </script>
 
 <style>

+ 6 - 3
pages_mine/pages/setupUser/Address.vue

@@ -6,7 +6,7 @@
 		
 	
 		<view>
-			<up-button type="primary" text="添加" @click="handleAdd"></up-button>
+			<!-- <up-button type="primary" text="添加" @click="handleAdd"></up-button> -->
 			<up-button type="error" text="确定" @click="handlOk"></up-button>
 		</view>
 	</view>
@@ -36,14 +36,17 @@
 
 
 	const handlOk = async () => {
-		// const res = await useraDdressData()
-		// console.log(res,'ok')
 		
 		const params = []
 		addInfoArr.value.forEach((item, index) => {
 			params.push(addComponentRef.value[index].modelForm)
 		})
 		
+		params.forEach(async (obj) => {
+			const res = await useraDdressData(obj)
+			console.log(res,'ok')
+		})
+		
 		console.log(addComponentRef.value, '>>>>>>vaddComponentRef')
 		console.log(params, '>>>>>>params');