css
liukangdong
2024-06-25 ebc96a1cf0424c04dceacbc42f9ad2a897223be9
h5/pages/staff/index.vue
@@ -1,14 +1,22 @@
<template>
   <view class="main_app">
      <view class="title_wrap">
         <view class="name" v-if="userInfo.realname">{{ userInfo.realname || '' }},欢迎登录~</view>
      <view class="name" v-if="userInfo.realname"
        >{{ userInfo.realname || "" }},欢迎登录~</view
      >
         <view class="name" v-else>请先登录</view>
         <view class="btn" @click="loginOut">{{ userInfo.realname ? '退出登录' : '去登录' }}</view>
      <view class="btn" @click="loginOut">{{
        userInfo.realname ? "退出登录" : "去登录"
      }}</view>
      </view>
      <view class="banner_wrap">
         <view class="h1">安泰物流</view>
         <view class="h2">安全重于泰山 服务追求卓越</view>
         <image class="banner" src="../../static/banner.jpg" mode="widthFix"></image>
      <image
        class="banner"
        src="../../static/banner.jpg"
        mode="widthFix"
      ></image>
      </view>
      <view class="title_wrap"><view class="name">业务办理</view></view>
      <view class="container1">
@@ -31,11 +39,17 @@
               <view class="h2">HIDDEN DANGER</view>
            </view>
            <view class="img_wrap img2" @click="jump('/pages/staff/vehicle/index')">
               <image src="@/static/staff/ic_yongcheshenqing.png" class="img"></image>
          <image
            src="@/static/staff/ic_yongcheshenqing.png"
            class="img"
          ></image>
               <view class="h1">用车申请</view>
               <view class="h2">VEHICLE APPLICATION</view>
            </view>
            <view class="img_wrap img2" @click="jump('/pages/changePassword/changePassword')">
        <view
          class="img_wrap img2"
          @click="jump('/pages/changePassword/changePassword')"
        >
               <image src="@/static/staff/ic_xiugaimima.png" class="img"></image>
               <view class="h1">修改密码</view>
               <view class="h2">CHANGE PASSWORD</view>
@@ -81,22 +95,22 @@
      return {
         userInfo: uni.getStorageSync('userInfo'),
         taskNum: 0
      };
    }
   },
   onLoad(){
      console.log('userInfo', this.userInfo);
    console.log('userInfo', this.userInfo)
      
   },
   onShow() {
      if(this.userInfo && this.userInfo.name){
    // if (this.userInfo && this.userInfo.name) {
         this.getTaskInfo()
      }
    // }
   },
   methods: {
      jump(path){
         uni.navigateTo({
            url: path
         });
      })
      },
      loginOut() {
         this.$store.commit('empty')
@@ -123,7 +137,7 @@
   align-items: center;
   margin-bottom: 24rpx;
   .name {
      font-weight: 500;
    font-weight: 600;
      font-size: 34rpx;
      color: #222222;
   }
@@ -178,7 +192,7 @@
      border-radius: 8rpx;
      overflow: hidden;
      .h1 {
         font-weight: 500;
      font-weight: 600;
         font-size: 32rpx;
         color: #222222;
         line-height: 48rpx;
@@ -236,10 +250,10 @@
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 24rpx
      font-size: 24rpx;
      }
      .h1 {
         font-weight: 500;
      font-weight: 600;
         font-size: 32rpx;
         color: #222222;
         line-height: 48rpx;