From 2c62224302e67151a26c73cdcb9b6421dc4dcc62 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 28 八月 2024 09:22:52 +0800
Subject: [PATCH] ll

---
 h5/pages/driver/index.vue |   59 ++++++++++++++++++++++++++---------------------------------
 1 files changed, 26 insertions(+), 33 deletions(-)

diff --git a/h5/pages/driver/index.vue b/h5/pages/driver/index.vue
index 2df909e..43cd875 100644
--- a/h5/pages/driver/index.vue
+++ b/h5/pages/driver/index.vue
@@ -13,53 +13,37 @@
 		<!--  -->
 		<view class="task_list">
 			<swiper circular class="task_swiper">
-				<swiper-item>
+				<swiper-item v-for="item in taskList" :key="item.id">
 					<view class="item">
 						<view class="head">
-							<view class="name">杩愯緭鍗�222</view>
+							<view class="name">杩愯緭鍗晎{ item.contractNum }}</view>
 							<view class="status">
-								<view class="text">璇风‘璁や换鍔�</view>
-								<view class="time">棰勮绛夊緟锛�12灏忔椂</view>
+								<view class="text" v-if="item.status == 0">璇风‘璁や换鍔�</view>
+								<view class="text" v-if="item.status == 1">璇蜂簬{{item.arriveDate.slice(5,11)}}鐜板満绛惧埌</view>
+								<view class="text" v-if="item.status == 2">鍓嶆柟鎺掗槦锛歿{item.lineUpNum}}杈�</view>
+								<view class="text" v-if="item.status == 3">璇峰叆鍥繘鍏ョ瓑寰呭尯</view>
+								<view class="text" v-if="item.status == 4">璇峰叆鍥仠闈�1鍙锋湀鍙颁綔涓�</view>
+								<view class="text" v-if="item.status == 5">1鍙锋湀鍙颁綔涓氫腑</view>
+								<view class="text" v-if="item.status == 6">浣滀笟宸插畬鎴�</view>
+								<view class="time" v-if="item.waitTime">{{ item.waitTime }}</view>
 							</view>
 						</view>
 						<view class="content">
 							<view class="info">
 								<view class="plate">
 									<image src="@/static/driver/wuliu_ic_car@2x.png" class="icon" mode=""></image>
-									<text>鐨朅D</text>
+									<text>{{ item.carCodeFront }}</text>
 								</view>
 								<view class="plate">
 									<image src="@/static/driver/wuliu_ic_huowu@2x.png" class="icon" mode=""></image>
-									<text>3000涓�</text>
+									<text>{{ item.totalNum }}涓囨敮</text>
 								</view>
 							</view>
 							<view class="sub">
-								<view class="time">02-01 08:11:11</view>
-								<view class="sub_btn" @click="handleTask()">纭浠诲姟</view>
-							</view>
-						</view>
-					</view>
-				</swiper-item>
-				<swiper-item>
-					<view class="item">
-						<view class="head">
-							<view class="name">杩愯緭鍗�222</view>
-							<view class="status"><view class="text">璇蜂笌鐜板満绛惧埌</view></view>
-						</view>
-						<view class="content">
-							<view class="info">
-								<view class="plate">
-									<image src="@/static/driver/wuliu_ic_car@2x.png" class="icon" mode=""></image>
-									<text>鐨朅D</text>
-								</view>
-								<view class="plate">
-									<image src="@/static/driver/wuliu_ic_huowu@2x.png" class="icon" mode=""></image>
-									<text>3000涓�</text>
-								</view>
-							</view>
-							<view class="sub">
-								<view class="time">02-01 08:11:11</view>
-								<view class="sub_btn" @click="handleTask(1)">绔嬪嵆绛惧埌</view>
+								<view class="time" v-if="item.arriveDate">{{ item.arriveDate.slice(5) }}</view>
+								<view v-if="item.status == 0" class="sub_btn" @click="handleTask(item)">纭浠诲姟</view>
+								<view v-if="item.status == 1" class="sub_btn" @click="handleSign(item)">绔嬪嵆绛惧埌</view>
+								<view v-if="item.status == 2" class="sub_btn" @click="handleQueup(item)">鏌ョ湅鎺掗槦</view>
 							</view>
 						</view>
 					</view>
@@ -112,13 +96,21 @@
 export default {
 	data() {
 		return {
-			driverInfo: uni.getStorageSync('driverInfo')
+			taskList: [],
+			driverInfo: uni.getStorageSync('driverInfo'),
+			
 		};
 	},
 	created() {
 		this.initData();
 	},
 	methods: {
+		handleSign(item) {
+			uni.navigateTo({
+				url: '/pages/driver/taskDetail?id=' + item.id
+			});
+		},
+		handleQueup(item) {},
 		initData() {
 			driverHomeData().then(res => {
 				if (res.code == 200) {
@@ -126,6 +118,7 @@
 						bookingTips: res.data.bookingTips,
 						reservationMap: res.data.reservationMap
 					});
+					this.taskList = res.data.platformJobList || []
 				}
 			});
 		},

--
Gitblit v1.9.3