소스 검색

首页/用户评论修改

贾宇博 3 주 전
부모
커밋
87f1826d8e

+ 80 - 71
components/Client/new_file.vue

@@ -3,36 +3,35 @@
 		<template>
 			<view class="Wrapper-grid">
 				<view class="serve-title client-title" v-if="userType == 2">注册专区</view>
-				<swiper :indicator-dots="true" class="swiper" v-if="serveiceList && serveiceList.length > 0">
-					<swiper-item>
-						<up-grid :border="false" col="5">
-							<up-grid-item v-for="(item, index) in serveiceList.slice(0,10)" :key="index"
-								:custom-style="custmoStyle" @click="handleGridClick(item)">
-								<view class="grid-box">
-									<view class="grid-icon">
-										<image :src="item.icon" class="service-img" mode="aspectFit" />
-									</view>
-
-									<text class="grid-text">{{ item.name }}</text>
-								</view>
-							</up-grid-item>
-						</up-grid>
-					</swiper-item>
-					<swiper-item>
-						<up-grid :border="false" col="5">
-							<up-grid-item v-for="(item, index) in serveiceList.slice(10,serveiceList.length)"
-								:key="index" :custom-style="custmoStyle" @click="handleGridClick(item)">
-								<view class="grid-box">
-									<view class="grid-icon">
-										<image :src="item.icon" class="service-img" mode="aspectFit" />
-									</view>
-
-									<text class="grid-text">{{ item.name }}</text>
-								</view>
-							</up-grid-item>
-						</up-grid>
-					</swiper-item>
-				</swiper>
+				<!-- <swiper :indicator-dots="true" class="swiper" v-if="serveiceList && serveiceList.length > 0"> -->
+				<!-- <swiper-item> -->
+				<up-grid :border="false" col="5">
+					<up-grid-item v-for="(item, index) in serveiceList.slice(0,10)" :key="index"
+						:custom-style="custmoStyle" @click="handleGridClick(item)">
+						<view class="grid-box">
+							<view class="grid-icon">
+								<image :src="item.icon" class="service-img" mode="aspectFit" />
+							</view>
+							<text class="grid-text">{{ item.name }}</text>
+						</view>
+					</up-grid-item>
+				</up-grid>
+				<!-- </swiper-item> -->
+				<!-- <swiper-item> -->
+				<up-grid :border="false" col="5">
+					<up-grid-item v-for="(item, index) in serveiceList.slice(10,serveiceList.length)" :key="index"
+						:custom-style="custmoStyle" @click="handleGridClick(item)">
+						<view class="grid-box">
+							<view class="grid-icon">
+								<image :src="item.icon" class="service-img" mode="aspectFit" />
+							</view>
+
+							<text class="grid-text">{{ item.name }}</text>
+						</view>
+					</up-grid-item>
+				</up-grid>
+				<!-- </swiper-item> -->
+				<!-- </swiper> -->
 
 				<up-toast ref="uToastRef" />
 			</view>
@@ -82,23 +81,23 @@
 
 	// 普通用户
 	const serviceList1 = [{
-			icon: '/static/Tioimages/1v专业指导.png',
-			name: '陪伴陪聊',
+			icon: '/static/Tioimages/父母体检.png',
+			name: '老人生活',
 			key: 1,
 		},
 		{
 			icon: '/static/Tioimages/1 妇女儿童权益保护服务.png',
-			name: '孩子陪伴',
+			name: '孩子成长',
 			key: 2,
 		},
 		{
-			icon: '/static/Tioimages/临时帮手.png',
-			name: '临时帮手',
+			icon: '/static/Tioimages/家庭保洁.png',
+			name: '家庭保洁',
 			key: 3,
 		},
 		{
-			icon: '/static/Tioimages/专家服务.png',
-			name: '专家服务',
+			icon: '/static/Tioimages/临时帮手.png',
+			name: '临时帮手',
 			key: 4,
 		},
 		{
@@ -107,27 +106,27 @@
 			key: 5,
 		},
 		{
-			icon: '/static/Tioimages/家庭保洁.png',
-			name: '家庭保洁',
+			icon: '/static/Tioimages/专家服务.png',
+			name: '专家服务',
 			key: 6,
 		},
 		{
-			icon: '/static/Tioimages/旅游服务.png',
+			icon: '/static/Tioimages/15-旅游服务-01.png',
 			name: '旅游服务',
 			key: 7,
 		},
 		{
-			icon: '/static/Tioimages/健康管理.png',
-			name: '健康管理',
+			icon: '/static/Tioimages/交友.png',
+			name: '交友专区',
 			key: 8,
 		},
 		{
-			icon: '/static/Tioimages/交友.png',
-			name: '交友专区',
+			icon: '/static/Tioimages/休闲娱乐.png',
+			name: '娱乐专区',
 			key: 9,
 		},
 		{
-			icon: '/static/Tioimages/购物商城.png',
+			icon: '/static/Tioimages/福利商城_购物车.png',
 			name: '商城购物',
 			key: 10,
 		},
@@ -136,63 +135,73 @@
 			name: '本地生活',
 			key: 11,
 		},
+		{
+			icon: '/static/Tioimages/其他服务.png',
+			name: '其他服务',
+			key: 12,
+		},
 	]
 
 	//志愿者
 	const serviceList2 = [{
-			icon: '/static/Tioimages/1v专业指导.png',
-			name: '陪伴陪聊',
+			icon: '/static/Tioimages/父母体检.png',
+			name: '老人生活',
 			key: 1,
 		},
 		{
 			icon: '/static/Tioimages/1 妇女儿童权益保护服务.png',
-			name: '孩子陪护',
+			name: '孩子成长',
 			key: 2,
 		},
-		{
-			icon: '/static/Tioimages/健康管理.png',
-			name: '健康管理',
-			key: 3,
-		},
 		{
 			icon: '/static/Tioimages/家庭保洁.png',
 			name: '家庭保洁',
-			key: 4
+			key: 3,
 		},
 		{
 			icon: '/static/Tioimages/临时帮手.png',
 			name: '临时帮手',
-			key: 5
-		},
-		{
-			icon: '/static/Tioimages/专家服务.png',
-			name: '专家服务',
-			key: 6
+			key: 4,
 		},
 		{
 			icon: '/static/Tioimages/家电维修.png',
 			name: '家电维护',
-			key: 8
+			key: 5,
+		},
+		{
+			icon: '/static/Tioimages/专家服务.png',
+			name: '专家服务',
+			key: 6,
 		},
 		{
-			icon: '/static/Tioimages/旅游服务.png',
+			icon: '/static/Tioimages/15-旅游服务-01.png',
 			name: '旅游服务',
-			key: 9
+			key: 7,
 		},
 		{
 			icon: '/static/Tioimages/交友.png',
 			name: '交友专区',
-			key: 10
+			key: 8,
+		},
+		{
+			icon: '/static/Tioimages/休闲娱乐.png',
+			name: '娱乐专区',
+			key: 9,
 		},
 		{
-			icon: '/static/Tioimages/购物商城.png',
+			icon: '/static/Tioimages/福利商城_购物车.png',
 			name: '商城购物',
-			key: 11
+			key: 10,
 		},
 		{
 			icon: '/static/Tioimages/本地生活.png',
 			name: '本地生活',
-			key: 12
+			key: 11,
+		},
+		{
+			icon: '/static/Tioimages/其他服务.png',
+			name: '其他服务',
+			key: 12,
 		},
 		{
 			icon: '/static/serverImg/home/icon/icon8.png',
@@ -210,11 +219,11 @@
 		return serviceList2
 	})
 
-	
 
-	
+
+
 	// 宫格点击事件
-	const handleGridClick = async (service) => {		
+	const handleGridClick = async (service) => {
 		// 用户
 		if (userType == 1) {
 
@@ -250,7 +259,7 @@
 					})
 					return
 				}
-				[1,2].includes(service.key) ? uni.navigateTo({
+				[1, 2].includes(service.key) ? uni.navigateTo({
 					url: `/pages_home/pages/register/index?data=${encodeURIComponent(JSON.stringify(service))}`
 				}) : uni.showToast({
 					title: '敬请期待',

+ 6 - 7
components/Services/services.vue

@@ -4,8 +4,8 @@
 			<template #left>
 				<view class="demo-warter" v-for="(item, index) in props.leftList" :key="index"
 					@click="goToDetail(item)">
-					<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
-						:index="index"></up-lazy-load>
+					<up-lazy-load threshold="50" border-radius="10" :image="item.volunteerPicture" :index="index"
+						mode="aspectFill"></up-lazy-load>
 					<view class="demo-title">
 						{{ item.businessTierName }}
 					</view>
@@ -24,8 +24,8 @@
 			<template #right>
 				<view class="demo-warter" v-for="(item, index) in props.rightList" :key="index"
 					@click="goToDetail(item)">
-					<up-lazy-load threshold="-450" border-radius="10" :image="item.volunteerPicture"
-						:index="index"></up-lazy-load>
+					<up-lazy-load threshold="50" border-radius="10" :image="item.volunteerPicture" :index="index"
+						mode="aspectFill"></up-lazy-load>
 					<view class="demo-title">
 						{{ item.businessTierName }}
 					</view>
@@ -62,7 +62,7 @@
 			serviceCategory: item.serviceCategory, // 获取 serviceCategory
 			businessManagementId: item.businessManagementId, //获取 businessManagementId
 		};
-		
+
 		uni.navigateTo({
 			url: `/pages_home/pages/Volunteerside/goodsDetails?params=${JSON.stringify(params)}`
 		});
@@ -105,10 +105,9 @@
 		font-size: 30rpx;
 		margin-top: 5px;
 		color: black;
-		/* margin-left: 15rpx; */
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 3;
+		-webkit-line-clamp: 2;
 		overflow: hidden;
 		text-overflow: ellipsis;
 		word-break: break-all;

+ 2 - 2
config.js

@@ -2,8 +2,8 @@
 const config = {
 	// baseUrl: 'https://vue.ruoyi.vip/prod-api',
 	//cloud后台网关地址
-	// baseUrl: 'http://192.168.100.94:9527',
-	baseUrl: 'https://zybooks.tech/prod-api',
+	baseUrl: 'http://192.168.100.133:9527',
+	// baseUrl: 'https://zybooks.tech/prod-api',
 	mapKey:'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
 	appName: '金邻助家',
 	// 应用信息

+ 5 - 7
pages_classify/pages/orderItem/orderdetails.vue

@@ -126,26 +126,24 @@
 				console.error('接口请求失败:', err);
 				throw err; // 重新抛出以进入 catch 块
 			});
-			console.log(res, '用户状态获取成功');
 			dataList.value = res.rows;
 			console.log(dataList.value, 'dataList.value');
 		} catch (e) {
 			console.error('获取数据异常:', e); // 确保这里打印错误
 		}
 	}
-	
-	const handlButClick = (item) =>{
-		const listData = encodeURIComponent(JSON.stringify(item.listData));
-		console.log(listData,'>>>>>>>>>>listData')
+
+	const handlButClick = (item) => {
 		uni.navigateTo({
-			url: `/pages_classify/pages/orderItem/userComment?volunteerInfo=${listData}`
-		})
+			url: `/pages_classify/pages/orderItem/userComment?mainOrderId=${mainOrderId.value}&data=${encodeURIComponent(JSON.stringify(listData.value))}`
+		});
 	}
 
 	// 获取传递的参数
 	onLoad(async (options) => {
 		mainOrderId.value = options.mainOrderId;
 		const res = await orderInfomainOrderId(mainOrderId.value)
+		console.log(res, '>>>>>>>res>>>>>>>>132')
 		listData.value = res.data;
 	});
 

+ 46 - 38
pages_classify/pages/orderItem/userComment.vue

@@ -1,38 +1,37 @@
 <template>
 	<view>
-		服务评价
-		<up-image :show-loading="true" :src="src" width="80px" height="80px" @click="click"></up-image>
+		<view>
+			服务评价:
+			<up-image :show-loading="true" :src="src" width="80px" height="80px" @click="click"></up-image>
+		</view>
 		<view>
 			<view>
 				<text>服务礼仪:</text>
 				<template>
-					<up-rate :count="count" v-model="IfonForm.protocolScore"></up-rate>
+					<up-rate :count="count" v-model="IfonForm.protocolScore" count="5"></up-rate>
 				</template>
 			</view>
 			<view>
 				<text>着装整洁:</text>
 				<template>
-					<up-rate :count="count" v-model="IfonForm.clothingScore"></up-rate>
+					<up-rate :count="count" v-model="IfonForm.clothingScore" count="5"></up-rate>
 				</template>
 			</view>
 			<view>
 				<text>专业能力:</text>
 				<template>
-					<up-rate :count="count" v-model="IfonForm.abilityScore"></up-rate>
+					<up-rate :count="count" v-model="IfonForm.abilityScore" count="5"></up-rate>
 				</template>
 			</view>
 			<view>
 				<text>服务质量:</text>
 				<template>
-					<up-rate :count="count" v-model="IfonForm.qualityScore"></up-rate>
+					<up-rate :count="count" v-model="IfonForm.qualityScore" count="5"></up-rate>
 				</template>
 			</view>
 		</view>
-		<!-- <up-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
-			:maxCount="10"></up-upload> -->
-		<view class="service-info order-card">
-			<!-- <view class="font-title">图片上传</view> -->
 
+		<view class="service-info order-card">
 			<!-- 回顯 -->
 			<view class="upload-box">
 				<view class="upload-img-item" v-for="(item, index) in fileList" :key="item.url">
@@ -46,28 +45,10 @@
 		</view>
 
 		<up-textarea v-model="IfonForm.userReview" placeholder="请输入评论内容"></up-textarea>
-		<up-button type="primary" text="发布" @click="handlButClick"></up-button>
+		<up-button type="error" text="发布" @click="handlButClick"></up-button>
 	</view>
 </template>
-<!-- /** 评分 */
-@Excel(name = "服务礼仪")
-@ApiModelProperty("服务礼仪")
-private Integer protocolScore;
-
-/** 评分 */
-@Excel(name = "服装整洁")
-@ApiModelProperty("服装整洁")
-private Integer clothingScore;
-
-/** 评分 */
-@Excel(name = "专业能力")
-@ApiModelProperty("专业能力")
-private Integer abilityScore;
-
-/** 评分 */
-@Excel(name = "服务质量")
-@ApiModelProperty("服务质量")
-private Integer qualityScore; -->
+
 <script setup>
 	import {
 		onMounted,
@@ -95,8 +76,7 @@ private Integer qualityScore; -->
 		clothingScore: 0, //服装整洁
 		abilityScore: 0, //专业能力
 		qualityScore: 0, //服务质量
-		userReview: '',
-		serviceOnePrice: 0,
+		userReview:'',
 	})
 
 
@@ -117,19 +97,28 @@ private Integer qualityScore; -->
 	const handlButClick = async () => {
 		// 提取所有图片的 URL
 		const imageUrls = fileList.value.map(item => item.url);
-
+		const volunteerInfoId = IfonForm.value.volunteerInfoId;
+		const secondOrderId = IfonForm.value.secondOrderId; 
 		try {
 			const params = {
 				...IfonForm.value,
 				images: imageUrls,
+				volunteerInfoId: volunteerInfoId,
+				secondOrderId: secondOrderId, 
 			}
 			console.log(params, 'params>>>')
 			const res = await usersUserFinishOrder(params)
-			console.log(res, 'usersUserFinishOrder>>>>>')
-			uni.showToast({
-				title: '评价提交成功',
-				icon: 'success'
-			});
+			if (res.code == 200) {
+				uni.navigateTo({
+					url: '/pages/classify'
+				})
+				uni.showToast({
+					title: '评价提交成功',
+					icon: 'success'
+				});
+			} else {
+				console.log('提交失败')
+			}
 		} catch (e) {
 			uni.showToast({
 				title: '提交失败,请重试',
@@ -138,6 +127,25 @@ private Integer qualityScore; -->
 		}
 
 	}
+
+onLoad(async (options) => {
+	const data = JSON.parse(decodeURIComponent(options.data));
+	console.log(data, '》》》》》》 获取传递的 listData'); // 获取传递的 listData
+
+	const secondOrderList = data.secondOrderList || [];
+	
+	// 获取第一个 secondOrderId
+	const secondOrderId = secondOrderList.length > 0 ? secondOrderList[0].secondOrderId : null;
+
+	// 如果 secondOrderId 存在,则设置到 IfonForm 中
+	if (secondOrderId) {
+		IfonForm.value.secondOrderId = secondOrderId;
+	}
+
+	// 获取 volunteerInfoId
+	const volunteerInfoId = data.volunteerInfo?.volunteerInfoId || data.volunteerInfoId;
+	IfonForm.value.volunteerInfoId = volunteerInfoId;
+});
 </script>
 
 <style>

BIN
static/Tioimages/15-旅游服务-01.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