Przeglądaj źródła

fix:更改订单金额,志愿者id

贾宇博 1 miesiąc temu
rodzic
commit
ce10f3678b

+ 17 - 20
pages/goodsDetails/goodsDetails.vue

@@ -80,12 +80,8 @@
 							type="daterange"></uniDatetimePickerMy>
 					</view>
 					<view>
-						<its-calendar
-							:timeArr="doorToDoorTimeArr"
-							:timeHostArr="timeHostArr"
-							@getByDate="getByDate"
-							@getByTime="getByTime"
-						></its-calendar>
+						<its-calendar :timeArr="doorToDoorTimeArr" :timeHostArr="timeHostArr" @getByDate="getByDate"
+							@getByTime="getByTime"></its-calendar>
 					</view>
 				</view>
 
@@ -150,7 +146,8 @@
 
 				<!-- 确认按钮 -->
 				<view class="confirm-button">
-					<up-button type="primary" :text="`确认购买 · ¥${computeMoney}`" @click="handlConfiRmpurchase"></up-button>
+					<up-button type="primary" :text="`确认购买 · ¥${computeMoney}`"
+						@click="handlConfiRmpurchase"></up-button>
 				</view>
 			</view>
 		</up-popup>
@@ -199,8 +196,8 @@
 	const show = ref(false); //立即购买
 	const showSum = ref(false);
 	const showNotify = ref(false) //支付成功提示
-	
-	
+
+
 	const computeMoney = computed(() => {
 		return totalTimes.value * onePrice.value
 	})
@@ -231,7 +228,7 @@
 		show.value = false; // 关闭第一个弹框
 		showSum.value = true; // 打开第二个弹框
 	};
-	const handlCancel = () =>{
+	const handlCancel = () => {
 		show.value = false; // 关闭第一个弹框
 	}
 	// 底部数据
@@ -378,7 +375,7 @@
 		totalTimes.value += 1 // 记录点击次数
 		console.log(totalTimes.value, '>>>>>>>>>totalTimes.value');
 	}
-	
+
 	// 立即购买显示时执行
 	const upPopupOpen = () => { //显示时初始化预存储信息数据
 		totalTimes.value = 0
@@ -391,17 +388,17 @@
 		// 定义要发送的数据
 		const orderData = {
 			orders: {
-				serviceOnePrice: onePrice.value,//需要传400死值返回给后端
-				serviceTotalPrice: computeMoney.value,//需要传获取到的总价
+				serviceOnePrice: onePrice.value, //需要传400死值返回给后端
+				serviceTotalPrice: computeMoney.value, //需要传获取到的总价
 				serviceCategory: 2,
-				totalTimes: totalTimes.value,//点击的次数
-				
+				totalTimes: totalTimes.value, //点击的次数
+				serviceStartDate: "2025-04-18",
 				startTime: "8:00",
 				serviceDuration: 4,
 				paymentMethod: 1,
 				addressId: 7,
 				remark: "我是图图小淘气,面对世界很好奇!",
-				volunteerId: 104
+				volunteerId: volunteerId.value
 			},
 			workDateList: [
 				// {
@@ -409,16 +406,16 @@
 				// }
 			]
 		};
-		
+
 		(new Set(currentDate.value)).forEach((item) => {
 			orderData.workDateList.push({
 				workDate: item,
 				workStartTime: currentTime.value,
 			})
 		})
-		
-		
-		
+
+
+
 
 		try {
 			const res = await ordersCreateOrder(orderData);

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

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view>
-			<view v-if="listData.address">
+			<view>
 				<up-tag text="默认" type="error"></up-tag>
 				<view>
 					{{listData.address.area}}
@@ -26,7 +26,7 @@
 							<view class="info-item">{{listData.volunteerInfo.name}}</view>
 							<view class="info-item">类别:11</view>
 							<view class="info-item">科目:111</view>
-							<view class="Telephone">电话:{{listData?.volunteerInfo?.phonenumber}}</view>
+							<view class="Telephone">电话:{{listData.volunteerInfo.phonenumber}}</view>
 							<view class="info-item">住址:{{listData.volunteerInfo.city}}</view>
 						</view>
 
@@ -48,10 +48,10 @@
 
 		<view>
 			<up-list @scrolltolower="scrolltolower">
-				<up-list-item>
+				<up-list-item v-for="(item, index) in listData.secondOrderList" :key="index">
 					<view class="Wrap-top">
 						<text>第一节课</text>
-						<text>2025-04-16 08:00</text>
+						<text>{{listData.secondOrderList.createTime}}</text>
 					</view>
 					<view class="list-item">
 						<image src="/static/img/dd.png" mode="aspectFill" class="item-image"></image>
@@ -59,7 +59,7 @@
 						<view class="item-info">
 							<view class="info-line">姓名:王麻子</view>
 							<view class="info-line">类别:刨土豆</view>
-							<view class="info-line">技能介绍:11</view>
+							<view class="info-line">技能介绍:{{listData.secondOrderList.remark}}</view>
 						</view>
 						<view class="item-right">
 							<view class="rating">评分:9.5</view>