renkang
2025-01-03 ccf28d1fed1aa2e5437dbe64b5133ba1cbde6ec7
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
<template>
    <view class="main_app">
        <view class="hone_name title">{{ userInfo.realname }},欢迎登录~</view>
        <view class="home_con">
            <image class="bg" src="@/static/home/home_bg.jpg" mode=""></image>
            <view class="h1">阜宁文体中心</view>
            <view class="h2">欢迎你</view>
        </view>
        <view class="title">业务办理</view>
        <view class="list">
            <view v-for="item in list1" class="item" @click="itemClick(item)">
                <image :src="item.img"></image>
                <view class="name">{{item.name}}</view>
            </view>
        </view>
        <view class="title">业务查询</view>
        <view class="list">
            <view v-for="item in list2" class="item" @click="itemClick(item)">
                <image :src="item.img"></image>
                <view class="name">{{item.name}}</view>
            </view>
        </view>
        <view class="loginout" @click="loginOut">退出登陆</view>
    </view>
</template>
 
<script>
    import {
        logoutPost
    } from '@/api'
    export default {
        data() {
            return {
                userInfo: uni.getStorageSync('userInfo') || {},
                list1: [{
                        name: '新增工单',
                        url: '/pages/workOrder/edit',
                        img: require('@/static/home/ic_xinzenggongdan@2x.png'),
                        auth: 'weixin:menu:visitcar'
                    },
                    {
                        name: '工单服务',
                        url: '/pages/workOrder/list',
                        img: require('@/static/home/ic_fangkeba.png'),
                        auth: 'weixin:menu:visitcar'
                    },
                    {
                        name: '设备运维',
                        url: '/pages/operation/device',
                        img: require('@/static/home/ic_fangkebaobe@2x.png'),
                        auth: 'weixin:menu:visitcar'
                    },
                ],
                list2: [{
                        name: '巡检任务',
                        url: '/pages/polling/task',
                        img: require('@/static/home/ic_renwuzhongxin@2x.png'),
                        auth: 'weixin:menu:visitcar'
                    },
                    {
                        name: '运维记录',
                        url: '/pages/operation/record',
                        img: require('@/static/home/ic_wodehuiyi@2x.png'),
                        auth: 'weixin:menu:visitcar'
                    },
                ]
            }
        },
        onLoad() {
 
        },
        methods: {
            itemClick(item) {
                uni.navigateTo({
                    url: item.url
                })
            },
            loginOut() {
                logoutPost().then(res => {
                    this.$store.commit('empty')
                    setTimeout(() => {
                        uni.redirectTo({
                            url: '/pages/login'
                        })
                    }, 300)
                })
                // window.location.href= 'https://zhcg.fnwtzx.com/fn_h5'
            },
 
        }
    }
</script>
 
<style lang="scss" scoped>
    .main_app {
        padding: 0 30rpx;
 
        .hone_name {
 
            height: 90rpx;
            display: flex;
            align-items: center;
        }
 
        .home_con {
            width: 690rpx;
            height: 270rpx;
            border-radius: 8rpx;
            margin-bottom: 40rpx;
            padding: 36rpx 40rpx;
            position: relative;
            color: #fff;
 
            .h1 {
                font-weight: bold;
                font-size: 44rpx;
                margin-bottom: 14rpx;
            }
        }
 
        .title {
            font-weight: 500;
            font-size: 34rpx;
        }
 
        .list {
            margin-top: 30rpx;
            margin-bottom: 80rpx;
            display: flex;
 
            .item {
                display: flex;
                flex-direction: column;
                align-items: center;
                width: 25%;
 
                image {
                    width: 88rpx;
                    height: 88rpx;
                    margin-bottom: 20rpx;
                }
 
                .name {
                    font-size: 26rpx;
                }
            }
        }
 
        .loginout {
            position: fixed;
            bottom: 88rpx;
            left: 50%;
            transform: translate(-50%, 0);
            width: 152rpx;
            height: 60rpx;
            border-radius: 30rpx;
            border: 1rpx solid $primaryColor;
            color: $primaryColor;
            font-size: 26rpx;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }
</style>