From 63f68bf25b920d5711032a6e675769855ed3582b Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 19 十二月 2024 10:18:16 +0800
Subject: [PATCH] ll
---
h5/pages/driver/index.vue | 520 +++++++++++++++++++++++++++++----------------------------
1 files changed, 262 insertions(+), 258 deletions(-)
diff --git a/h5/pages/driver/index.vue b/h5/pages/driver/index.vue
index 01eb818..f3c63aa 100644
--- a/h5/pages/driver/index.vue
+++ b/h5/pages/driver/index.vue
@@ -45,7 +45,8 @@
<view class="sub">
<view class="time" v-if="item.arriveDate && item.contractNum">{{ item.arriveDate.slice(5) }}</view>
<view class="time" v-if="item.type != 4 && item.platformWmsJob && item.platformWmsJob.ioCreatedate">
- {{ item.platformWmsJob.ioCreatedate.slice(5, 19) }}</view>
+ {{ item.platformWmsJob.ioCreatedate.slice(5, 19) }}
+ </view>
<view v-if="item.status == 0" class="sub_btn">纭浠诲姟</view>
<view v-if="item.status == 1" class="sub_btn">绔嬪嵆绛惧埌</view>
<view v-if="item.status == 2" class="sub_btn" @click.stop="handleQueue(item)">鏌ョ湅鎺掗槦</view>
@@ -99,328 +100,331 @@
</template>
<script>
-import {
- logoutPost,
- driverHomeData,
- app_url,
- getLastWaitJob
-} from '@/api'
-export default {
- data() {
- return {
- taskList: [],
- driverInfo: uni.getStorageSync('driverInfo'),
-
- }
- },
- onLoad() {
- const ywinfo = uni.getStorageSync('ywinfo') || {}
- if(ywinfo.ywid && ywinfo.type == 0){
- setTimeout(() => {
- uni.removeStorageSync('ywinfo')
- }, 500)
- const yw = ywinfo.yw
- if(yw == 7){
- this.jump('/pages/driver/reservedDetail?id=' + ywinfo.ywid)
- }else if(yw == 8){
- this.jump('/pages/driver/taskDetail?id=' + ywinfo.ywid)
- }else if(yw == 0) {
- getLastWaitJob({ uuid: ywinfo.ywid }).then(res => {
- if(res.data && res.data.id){
- this.taskClick(res.data)
- }
- })
- }
- }
- },
- onShow() {
- this.initData()
- },
-
- methods: {
- jump(path) {
- this.$jump(path)
+ import {
+ logoutPost,
+ driverHomeData,
+ app_url,
+ getLastWaitJob
+ } from '@/api'
+ export default {
+ data() {
+ return {
+ taskList: [],
+ driverInfo: uni.getStorageSync('driverInfo'),
+ }
},
- initData() {
- driverHomeData().then(res => {
- if (res.code == 200) {
- uni.setStorageSync('driverGuide', {
- bookingTips: res.data.bookingTips,
- reservationMap: res.data.reservationMap,
- signDistance: res.data.signDistance
+ onLoad() {
+ const ywinfo = uni.getStorageSync('ywinfo') || {}
+ if (ywinfo.ywid && ywinfo.type == 0) {
+ uni.setStorageSync('ywinfo',{})
+ const yw = ywinfo.yw
+ setTimeout(() => {
+ if (yw == 7) {
+ this.jump('/pages/driver/reservedDetail?id=' + ywinfo.ywid)
+ } else if (yw == 8) {
+ this.jump('/pages/driver/taskDetail?id=' + ywinfo.ywid)
+ } else if (yw == 0) {
+ getLastWaitJob({
+ uuid: ywinfo.ywid
+ }).then(res => {
+ if (res.data && res.data.id) {
+ this.taskClick(res.data)
+ }
+ })
+ }
+ }, 100)
+ }
+ },
+ onShow() {
+ this.initData()
+ },
+
+ methods: {
+ jump(path) {
+ this.$jump(path)
+ },
+ initData() {
+ driverHomeData().then(res => {
+ if (res.code == 200) {
+ uni.setStorageSync('driverGuide', {
+ bookingTips: res.data.bookingTips,
+ reservationMap: res.data.reservationMap,
+ signDistance: res.data.signDistance
+ })
+ this.taskList = res.data.platformJobList || []
+ }
+ })
+ },
+ loginOut() {
+ logoutPost({
+ isH5: 1
+ }).then(res => {
+ this.$store.commit('empty')
+ setTimeout(() => {
+ window.location.href = app_url
+ }, 300)
+ })
+ },
+ taskClick(item) {
+ const status = item.status
+ if (status == 0) {
+ uni.navigateTo({
+ url: '/pages/driver/taskConfirm?id=' + item.id
})
- this.taskList = res.data.platformJobList || []
}
- })
- },
- loginOut() {
- logoutPost({isH5: 1}).then(res => {
- this.$store.commit('empty')
- setTimeout(() => {
- window.location.href = app_url
- }, 300)
- })
- },
- taskClick(item) {
- const status = item.status
- if (status == 0) {
+ // else if(status == 2){
+ // uni.navigateTo({url:'/pages/driver/queueUp?jobId=' + item.id})
+ // }
+ else {
+ uni.navigateTo({
+ url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`
+ })
+ }
+ },
+ handleTask(item) {
uni.navigateTo({
url: '/pages/driver/taskConfirm?id=' + item.id
})
- }
- // else if(status == 2){
- // uni.navigateTo({url:'/pages/driver/queueUp?jobId=' + item.id})
- // }
- else {
+ },
+ handleSign(item) {
uni.navigateTo({
url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`
})
- }
- },
- handleTask(item) {
- uni.navigateTo({
- url: '/pages/driver/taskConfirm?id=' + item.id
- })
- },
- handleSign(item) {
- uni.navigateTo({
- url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`
- })
- },
- handleQueue(item) {
- uni.navigateTo({
- url: '/pages/driver/queueUp?jobId=' + item.id
- })
- },
+ },
+ handleQueue(item) {
+ uni.navigateTo({
+ url: '/pages/driver/queueUp?jobId=' + item.id
+ })
+ },
+ }
}
-}
</script>
<style lang="scss">
-.title_wrap {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24rpx;
- padding-top: 10rpx;
-
- .name {
- font-weight: 600;
- font-size: 34rpx;
- color: #222222;
- }
-
- .btn {
- width: 144rpx;
- height: 56rpx;
- border-radius: 36rpx;
- border: 1rpx solid $uni-color-primary;
- font-size: 26rpx;
- color: $uni-color-primary;
+ .title_wrap {
display: flex;
- justify-content: center;
+ justify-content: space-between;
align-items: center;
- }
-}
+ margin-bottom: 24rpx;
+ padding-top: 10rpx;
-.main_app {
- padding-top: 12rpx;
-}
+ .name {
+ font-weight: 600;
+ font-size: 34rpx;
+ color: #222222;
+ }
-.banner_wrap {
- padding: 54rpx 44rpx;
- color: #fff;
- position: relative;
- width: 688rpx;
- height: 270rpx;
- margin-bottom: 28rpx;
-
- .h1 {
- font-weight: bold;
- line-height: 66rpx;
- font-size: 44rpx;
- margin-bottom: 14rpx;
+ .btn {
+ width: 144rpx;
+ height: 56rpx;
+ border-radius: 36rpx;
+ border: 1rpx solid $uni-color-primary;
+ font-size: 26rpx;
+ color: $uni-color-primary;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
}
- .h2 {
- font-weight: 600;
- font-size: 28rpx;
- width: 192rpx;
- color: $uni-color-primary;
- height: 48rpx;
- line-height: 48rpx;
- text-align: center;
- background: #ffffff;
- box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(39, 155, 170, 0.31);
- border-radius: 24rpx;
+ .main_app {
+ padding-top: 12rpx;
}
- .banner {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- z-index: -1;
- }
-}
-
-.container1 {
- display: flex;
- flex-wrap: wrap;
-
- view {
- width: 336rpx;
- }
-
- .left {
- margin-right: 18rpx;
- }
-
- .img_wrap {
+ .banner_wrap {
+ padding: 54rpx 44rpx;
+ color: #fff;
position: relative;
- padding: 24rpx 0rpx 0 28rpx;
- border-radius: 8rpx;
- overflow: hidden;
+ width: 688rpx;
+ height: 270rpx;
+ margin-bottom: 28rpx;
.h1 {
- font-weight: 600;
- font-size: 32rpx;
- color: #222222;
- line-height: 48rpx;
- margin-bottom: 4rpx;
+ font-weight: bold;
+ line-height: 66rpx;
+ font-size: 44rpx;
+ margin-bottom: 14rpx;
}
.h2 {
- font-size: 22rpx;
- color: #7b9da1;
- line-height: 34rpx;
+ font-weight: 600;
+ font-size: 28rpx;
+ width: 192rpx;
+ color: $uni-color-primary;
+ height: 48rpx;
+ line-height: 48rpx;
+ text-align: center;
+ background: #ffffff;
+ box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(39, 155, 170, 0.31);
+ border-radius: 24rpx;
}
- .img {
- width: 100%;
- height: 100%;
+ .banner {
position: absolute;
top: 0;
left: 0;
+ width: 100%;
z-index: -1;
}
}
- .img1 {
- width: 336rpx;
- height: 296rpx;
- margin-bottom: 16rpx;
- }
+ .container1 {
+ display: flex;
+ flex-wrap: wrap;
- .img2 {
- width: 336rpx;
- height: 140rpx;
- margin-bottom: 16rpx;
- }
-}
+ view {
+ width: 336rpx;
+ }
-.task_list {
- margin-bottom: 0rpx;
+ .left {
+ margin-right: 18rpx;
+ }
- .task_swiper {
- padding: 12rpx 10rpx;
- height: 340rpx;
- width: 730rpx;
- margin-left: -20rpx;
- box-sizing: border-box;
- }
+ .img_wrap {
+ position: relative;
+ padding: 24rpx 0rpx 0 28rpx;
+ border-radius: 8rpx;
+ overflow: hidden;
- .item {
- background: #ffffff;
- box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(39, 155, 170, 0.32);
- border-radius: 16rpx;
- height: 260rpx;
- width: 98%;
- margin-left: 1%;
-
- .head {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
- padding: 0rpx 30rpx;
- height: 92rpx;
-
- .name {
+ .h1 {
font-weight: 600;
- font-size: 36rpx;
+ font-size: 32rpx;
color: #222222;
+ line-height: 48rpx;
+ margin-bottom: 4rpx;
}
- .status {
- color: $uni-color-primary;
- font-weight: 600;
- text-align: right;
+ .h2 {
+ font-size: 22rpx;
+ color: #7b9da1;
+ line-height: 34rpx;
+ }
- .time {
- font-size: 24rpx;
- font-weight: 360;
- }
+ .img {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1;
}
}
- .content {
- height: 180rpx;
+ .img1 {
+ width: 336rpx;
+ height: 296rpx;
+ margin-bottom: 16rpx;
+ }
- .info {
+ .img2 {
+ width: 336rpx;
+ height: 140rpx;
+ margin-bottom: 16rpx;
+ }
+ }
+
+ .task_list {
+ margin-bottom: 0rpx;
+
+ .task_swiper {
+ padding: 12rpx 10rpx;
+ height: 340rpx;
+ width: 730rpx;
+ margin-left: -20rpx;
+ box-sizing: border-box;
+ }
+
+ .item {
+ background: #ffffff;
+ box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(39, 155, 170, 0.32);
+ border-radius: 16rpx;
+ height: 260rpx;
+ width: 98%;
+ margin-left: 1%;
+
+ .head {
display: flex;
- padding: 24rpx 30rpx;
+ justify-content: space-between;
+ align-items: center;
+ background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
+ padding: 0rpx 30rpx;
+ height: 92rpx;
- .plate {
- flex: 1;
- display: flex;
- align-items: center;
+ .name {
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #222222;
+ }
- .icon {
- width: 26rpx;
- height: 26rpx;
- margin-right: 10rpx;
+ .status {
+ color: $uni-color-primary;
+ font-weight: 600;
+ text-align: right;
+
+ .time {
+ font-size: 24rpx;
+ font-weight: 360;
}
}
}
- .sub {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 68rpx;
- padding: 0 30rpx 0;
+ .content {
+ height: 180rpx;
- .time {
- font-size: 26rpx;
- color: #999999;
+ .info {
+ display: flex;
+ padding: 24rpx 30rpx;
+
+ .plate {
+ flex: 1;
+ display: flex;
+ align-items: center;
+
+ .icon {
+ width: 26rpx;
+ height: 26rpx;
+ margin-right: 10rpx;
+ }
+ }
}
- .sub_btn {
+ .sub {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
height: 68rpx;
- line-height: 68rpx;
- padding: 0 34rpx;
- color: #ffffff;
- background: $uni-color-primary;
- box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(39, 155, 170, 0.4);
- border-radius: 40rpx;
+ padding: 0 30rpx 0;
+
+ .time {
+ font-size: 26rpx;
+ color: #999999;
+ }
+
+ .sub_btn {
+ height: 68rpx;
+ line-height: 68rpx;
+ padding: 0 34rpx;
+ color: #ffffff;
+ background: $uni-color-primary;
+ box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(39, 155, 170, 0.4);
+ border-radius: 40rpx;
+ }
}
}
}
}
-}
-.copyright {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 44rpx;
- font-size: 24rpx;
- color: #666666;
+ .copyright {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 44rpx;
+ font-size: 24rpx;
+ color: #666666;
- image {
- width: 40rpx;
- height: 40rpx;
+ image {
+ width: 40rpx;
+ height: 40rpx;
+ }
}
-}
</style>
\ No newline at end of file
--
Gitblit v1.9.3