瀏覽代碼

fix: 修复bug

chenjj 1 月之前
父節點
當前提交
a37cfc337f

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

@@ -4,10 +4,10 @@
 		<view class="classify-main" v-if="userType == '1'">
 			<up-tabs v-if="column2 && column2.length > 0" :list="column2" :scrollable="false" @change="onChange"
 				:activeStyle="{
-			color: 'rgba(255, 87, 4, 1)',
-			fontWeight: 'bold',
-			transform: 'scale(1.05)'
-		}" lineColor="rgba(255, 87, 4, 1)" :current="tabKey">
+					color: 'rgba(255, 87, 4, 1)',
+					fontWeight: 'bold',
+					transform: 'scale(1.05)'
+				}" lineColor="rgba(255, 87, 4, 1)" :current="tabKey">
 			</up-tabs>
 			<view class="list">
 				<OrderItem v-if="dataList && dataList.length > 0" :dataList="dataList" />
@@ -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.businessTierName }}</view>
 							<view class="info-line skill-description">技能介绍:{{ item.skillDescribe }}</view>
 						</view>
 
@@ -53,134 +53,134 @@
 </template>
 
 <script setup>
-	import {
-		ref,
-		onMounted
-	} from "vue"
-
-	// const tab = ref('')
-	const userType = uni.getStorageSync('userType') //读取本地存储
-
-	// 用户/志愿者 识别标识
-	const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
-	const orderStatus = ref(0)
-	const column2 = [{
-			name: "全部",
-			value: "",
-		},
-		{
-			name: "待支付",
-			value: "1",
-		},
-		{
-			name: "待服务",
-			value: "2",
-		},
-		{
-			name: "进行中",
-			value: "3",
-		},
-		{
-			name: "已完成",
-			value: "4",
-		},
-		{
-			name: "已取消",
-			value: "5",
-		}
-	]
-
-
-	const props = defineProps({
-		dataList: {
-			typeof: Array,
-			default: () => [],
-		},
-	})
-
-	const emits = defineEmits([
-		'fetchData'
-	])
-
-
-	const handlClick = (item) => {
-		const mainOrderId = item.mainOrderId; // 获取详情id
-		uni.navigateTo({
-			url: `/pages_classify/pages/orderItem/orderdetails?mainOrderId=${mainOrderId}`
-		});
-	}
-
-	function onChange(tabItem) {
-		// tab.value = tabItem.value;
-		emits('fetchData', tabItem.value)
-	}
+import {
+	ref,
+	onMounted
+} from "vue"
+
+// const tab = ref('')
+const userType = uni.getStorageSync('userType') //读取本地存储
+
+// 用户/志愿者 识别标识
+const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
+const orderStatus = ref(0)
+const column2 = [{
+	name: "全部",
+	value: "",
+},
+{
+	name: "待支付",
+	value: "1",
+},
+{
+	name: "待服务",
+	value: "2",
+},
+{
+	name: "进行中",
+	value: "3",
+},
+{
+	name: "已完成",
+	value: "4",
+},
+{
+	name: "已取消",
+	value: "5",
+}
+]
+
+
+const props = defineProps({
+	dataList: {
+		typeof: Array,
+		default: () => [],
+	},
+})
+
+const emits = defineEmits([
+	'fetchData'
+])
+
+
+const handlClick = (item) => {
+	const mainOrderId = item.mainOrderId; // 获取详情id
+	uni.navigateTo({
+		url: `/pages_classify/pages/orderItem/orderdetails?mainOrderId=${mainOrderId}`
+	});
+}
+
+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: 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;
-	}
+.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;
+}
 </style>

+ 11 - 11
pages/common/rankingList/index.vue

@@ -30,27 +30,27 @@ const datas = [
         img: '/static/serverImg/home/ranking.png',
         name: '专业深度保洁',
         tag: '家庭清洁',
-        text: '专业设备,深度除螨,全面消毒',
+        text: '专业设备,深度除螨,全面消毒',
         dese: '本月已服务2890',
         count: '4.9'
     },
     {
         id: 2,
         img: '/static/serverImg/home/ranking.png',
-        name: '专业深度保洁',
-        tag: '家庭清洁',
-        text: '专业设备,深度除螨,全面消毒',
-        dese: '本月已服务2890',
-        count: '4.9'
+        name: '高级月嫂服务',
+        tag: '家务帮手',
+        text: '专业母婴护理、科学坐月子',
+        dese: '本月已服务2456',
+        count: '4.8'
     },
     {
         id: 3,
         img: '/static/serverImg/home/ranking.png',
-        name: '专业深度保洁',
-        tag: '家庭清洁',
-        text: '专业设备,深度除螨,全面消毒',
-        dese: '本月已服务2890',
-        count: '4.9'
+        name: '一对一解答',
+        tag: '陪伴陪聊',
+        text: '个性化解答,有效提升',
+        dese: '本月已服务2100',
+        count: '4.7'
     }
 ]
 

+ 17 - 1
pages/goodsDetails/goodsDetails.vue

@@ -29,7 +29,9 @@
 			</up-card>
 			<up-card title="证书" :thumb="thumb" :head-style="{ height: '80rpx', padding: '20rpx',}">
 				<template #body>
-					<image src="/static/zhiyuanzhe.jpg" mode="" style="width: 100%;"></image>
+					<view class="certificate">
+						<image  v-for="item in certificationPictures" :key="item" :src="item" mode="" style="width: 100%;" class="certificate-img"></image>
+					</view>
 				</template>
 			</up-card>
 			<!-- 固定底部按钮区 -->
@@ -194,6 +196,12 @@
 		return totalTimes.value * onePrice.value
 	})
 
+	const certificationPictures =computed(()=>{
+		if(listData.value.certificationPicture){
+			return listData.value.certificationPicture.split(',')
+		}
+		return []
+	})
 
 	// 定义方法  
 	function open() {
@@ -630,4 +638,12 @@
 	.confirm-button {
 		margin-top: 40rpx;
 	}
+	.certificate {
+		display: flex;
+		flex-direction: column;
+
+	}
+	.certificate-img {
+		margin-bottom: 24rpx;
+	}
 </style>

+ 21 - 2
pages_classify/pages/orderItem/orderdetails.vue

@@ -47,7 +47,9 @@
 			</up-card>
 			<up-card title="证书" :head-style="{ height: '80rpx', padding: '20rpx',}">
 				<template #body>
-					<image src="/static/zhiyuanzhe.jpg" mode="" style="width: 100%;"></image>
+					<view class="certificate">
+						<image  v-for="item in certificationPictures" :key="item" :src="item" mode="" style="width: 100%;" class="certificate-img"></image>
+					</view>
 				</template>
 			</up-card>
 		</view>
@@ -88,7 +90,8 @@
 		onLoad
 	} from '@dcloudio/uni-app'
 	import {
-		ref
+		ref,
+		computed
 	} from "vue";
 	import {
 		orderInfomainOrderId
@@ -98,6 +101,14 @@
 	const orderStatus = ref(0)
 	const score = ref(null)
 	const mainOrderId = ref(''); //志愿者ID
+
+	const certificationPictures =computed(()=>{
+		if(listData.value.volunteerInfo.certificationPicture){
+			return listData.value.volunteerInfo.certificationPicture.split(',')
+		}
+		return []
+	})
+
 	// 获取传递的参数
 	onLoad(async (options) => {
 		mainOrderId.value = options.mainOrderId; // 存储到响应式变量
@@ -255,4 +266,12 @@
 		margin-top: 18rpx;
 		width: 100%;
 	}
+	.certificate {
+		display: flex;
+		flex-direction: column;
+
+	}
+	.certificate-img {
+		margin-bottom: 24rpx;
+	}
 </style>