ll
liukangdong
2024-12-26 8866718edafe8f312feb1e7e4c3f9be531c0f7b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<template>
  <view class="main_app">
        <view class="main_header">
            <view class="com">
                <!-- <image src="../../static/back.svg" class="back"></image> -->
            </view>
            <view class="title">调度平台</view>
            <view class="com loginout" @click="loginout">退出登录</view>
        </view>
    <view class="main_content">
        <view class="banner">
          <image src="@/static/banner_diaodu@2x.png" mode=""></image>
        </view>
        <view class="module">
          <view class="item" @click="jump('/pages/index/center')">
            <image src="@/static/ic_yuetaidiaodu@2x.png" mode=""></image>
            <view class="text">月台调度中心</view>
          </view>
          <view class="item" @click="jump('/pages/index/queueup')">
            <image src="@/static/ic_cheliangpaidui@2x.png" mode=""></image>
            <view class="text">车队排队情况</view>
          </view>
          <view class="item" @click="jump('/pages/index/control')">
            <image src="@/static/ic_qiyong@2x.png" mode=""></image>
            <view class="text">月台启用停用</view>
          </view>
          <view class="item" @click="jump('/pages/index/set')">
            <image src="@/static/ic_peizhiyuetai@2x.png" mode=""></image>
            <view class="text">配置显示月台</view>
          </view>
        </view>
        <!-- footer -->
        <view class="main_footer">
          <image src="@/static/logo@2x.png" mode=""></image>
          <text>安徽安泰物流有限责任公司版权所有</text>
        </view>
    </view>
  </view>
</template>
 
<script>
export default {
  data() {
    return {
      title: 'Hello'
    }
  },
  onLoad() {
        const token = uni.getStorageSync('token')
        if(!token){
            uni.redirectTo({
                url: '/pages/index/login'
            })
        }
  },
  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
      })
    },
  }
}
</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;
        .com{
            width: 200rpx;
            display: flex;
            align-items: center;
        }
        .back{
            width: 42rpx;
            height: 42rpx;
        }
        .title{
            font-weight: 500;
            font-size: 36rpx;
        }
        .loginout{
            justify-content: flex-end;
        }
    }
.main_app {
  min-height: 100vh;
  background: #f7f7f7;
    padding: 0;
    .main_content{
        padding: 30rpx;
    }
  .banner {
    width: 100%;
    height: 270rpx;
    border-radius: 24rpx;
    margin-bottom: 40rpx;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .module {
    display: flex;
    flex-wrap: wrap;
    .item {
      width: 336rpx;
      height: 290rpx;
      background: #ffffff;
      border-radius: 24rpx;
      margin-bottom: 20rpx;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      image {
        width: 112rpx;
        height: 112rpx;
        margin-bottom: 28rpx;
      }
      .text {
        font-weight: 500;
        font-size: 36rpx;
        color: #222222;
      }
      &:nth-of-type(2n) {
        margin-left: 18rpx;
      }
    }
  }
  .main_footer {
    width: 100%;
    position: fixed;
    bottom: 84rpx;
    display: flex;
    justify-content: center;
    font-size: 24rpx;
    color: #666666;
    image {
      width: 40rpx;
      height: 40rpx;
    }
  }
}
</style>