贾宇博 1 mese fa
parent
commit
5715cbf4de

+ 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: {
 		// 应用名称

+ 2 - 2
pages/Client/new_file.vue

@@ -177,6 +177,7 @@
 
 	const getParentId = (service) => parentIdMap[service.name] || 1;
 
+
 	// 宫格点击事件
 	const handleGridClick = async (index) => {
 		const service = serviceList1.value[index]; // 获取点击的服务条目
@@ -228,8 +229,7 @@
 		init();
 
 	}
-	};
-
+};
 
 	const change = (e) => {
 		console.log('change', e);

+ 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 {

+ 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');