qingyiay
2023-10-07 21fb37c7162d5b47a14d6438870377c85fcc0b52
pages/driver-page/driver-index/driver-index.vue
@@ -6,6 +6,25 @@
            <view class="wait-collection"
               style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain">
            </view>
            <!-- 引导页 -->
            <view class="noob-tour"
               v-if="roleType===3&&isFirstLogin">
               <combined-title title="操作指引"></combined-title>
               <u-cell-group>
                  <u-cell title="新手指引"
                     name='1'
                     :clickable="true"
                     @click="noobTour">
                     <u-badge type="primary"
                        value="01"
                        slot='icon'></u-badge>
                     <u-icon slot="value"
                        name="arrow-right"
                        size="30"
                        color="#b8b8b8"></u-icon>
                  </u-cell>
               </u-cell-group>
            </view>
            <view class="collection-form">
               <view class="collection-form-item"
                  v-for="(item, index) in driverBillOfLoadingData.list1"
@@ -220,6 +239,12 @@
                  </view>
               </view>
               <view class="white-block"></view>
               <!-- 图片预览弹出框 -->
               <view class="previewImage-container">
                  <previewImage ref="previewImage"
                     :imgs="driverTourImgList"
                     :saveBtn='false'></previewImage>
               </view>
            </view>
         </view>
      </view>
@@ -229,10 +254,13 @@
<script>
   import { customerId } from '@/utils/status';
   import combinedTitle from '@/components/combined-title/combined-title.vue';
   import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
   import { mapState } from 'vuex'
   import { BaseUrl } from '@/api/publicInterface.js'
   export default {
      components: {
         combinedTitle
         combinedTitle,
         previewImage
      },
      props: {
         indexdriverBillOfLoadingData: {
@@ -249,6 +277,12 @@
            immediate: true
         }
      },
      computed: {
         ...mapState(['driverTourImgList']),
         roleType() {
            return uni.getStorageSync('roleType');
         },
      },
      data() {
         return {
            driverBillOfLoadingData: {
@@ -263,7 +297,10 @@
            qiangDanOrderPlanId: null,
            fleetId: '',
            xsUserId: '',
            customerId: ''
            customerId: '',
            isFirstLogin: true, //是否是第一次登录
            phone: "",
            isFirstTime: false //是否是登录进入首页,还是别的页面返回 false是登录 true是别的页面
         };
      },
      onShow() {
@@ -280,6 +317,9 @@
         },
         init() {
            this.qiangDanList();
            if (!this.isFirstTime) {
               this.getLogOn()
            }
         },
         // 司机首页列表
         qiangDanList() {
@@ -337,7 +377,7 @@
         },
         list3CardIconClick(value) {
            uni.navigateTo({
               url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}`
               url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}&orderType=${value.orderType}`
            });
         },
         // 提煤单详情
@@ -351,7 +391,30 @@
            uni.navigateTo({
               url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
            });
         }
         },
         noobTour() {
            this.$refs.previewImage.open('https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png')
         },
         getLogOn() {
            this.isFirstTime = true
            this.$reqGet('getUserEntity').then(res => {
               this.phone = res.data.phone
            }).then(() => {
               uni.request({
                  url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`,
                  success: res => {
                     // res.data.data 为1 代表第一次登录  为0取消学习指引 为2 代表存在
                     if (res.data.data === 1) {
                        this.noobTour()
                     } else if (res.data.data === 2) {
                        this.isFirstLogin = true
                     } else {
                        this.isFirstLogin = false
                     }
                  }
               });
            })
         },
      }
   };
</script>
@@ -719,11 +782,22 @@
                        color: #ffffff;
                        margin-right: vww(20);
                     }
                     .filedname {
                        width: 80%;
                     }
                  }
                  .map-icon {
                     position: absolute;
                     right: vww(-1);
                     top: vww(2)
                  }
               }
               .first-extra {
                  @include firstLine;
                  position: relative;
                  .main-information {
                     width: 100%;
@@ -744,6 +818,16 @@
                        color: #ffffff;
                        margin-right: vww(20);
                     }
                     .filedname {
                        width: 80%;
                     }
                  }
                  .map-icon {
                     position: absolute;
                     right: vww(-1);
                     top: vww(2)
                  }
               }
@@ -751,6 +835,7 @@
                  @include firstLine;
                  margin: 0;
                  margin-left: vww(16);
                  position: relative;
                  .main-information {
                     width: 100%;
@@ -771,6 +856,16 @@
                        color: #ffffff;
                        margin-right: vww(20);
                     }
                     .filedname {
                        width: 80%;
                     }
                  }
                  .map-icon {
                     position: absolute;
                     right: vww(-1);
                     top: vww(2)
                  }
               }
@@ -835,6 +930,12 @@
               margin-top: vww(10);
            }
         }
         .noob-tour {
            margin-bottom: vww(10);
            position: relative;
            top: -240rpx;
         }
      }
   }
</style>