ll
liukangdong
2024-09-24 57c140de40d75af475f5a1accc693172ffaaaf0d
pda/pages/index/index.vue
@@ -1,5 +1,11 @@
<template>
  <view class="main_app">
      <view class="main_header">
         <image src="../../static/back.svg" class="back"></image>
         <view class="title">调度平台</view>
         <view class="loginout" @click="loginout">退出登录</view>
      </view>
    <view class="main_content">
    <view class="banner">
      <image src="@/static/banner_diaodu@2x.png" mode=""></image>
    </view>
@@ -27,6 +33,7 @@
      <text>安徽安泰物流有限责任公司版权所有</text>
    </view>
  </view>
  </view>
</template>
<script>
@@ -40,6 +47,23 @@
  },
  methods: {
      loginout() {
         uni.showModal({
            title: '提示',
            content: '确认要退出登录吗',
            success: (res) => {
               if (res.confirm) {
                  uni.clearStorageSync({})
                  uni.redirectTo({
                     url: '/pages/index/login'
                  })
               } else if (res.cancel) {
                  console.log('用户点击取消');
               }
            }
         });
      },
    jump(path) {
      uni.navigateTo({
        url: path
@@ -49,10 +73,31 @@
}
</script>
<style lang="scss">
   .main_header{
      width: 100%;
      height: 176rpx;
      padding: 88rpx 30rpx 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: $uni-color-primary;
      color: #fff;
      .back{
         width: 42rpx;
         height: 42rpx;
      }
      .title{
         font-weight: 500;
         font-size: 36rpx;
      }
   }
.main_app {
  padding: 30rpx;
  min-height: 100vh;
  background: #f7f7f7;
   padding: 0;
   .main_content{
      padding: 30rpx;
   }
  .banner {
    width: 100%;
    height: 270rpx;