Mr.Shi
2023-09-04 682182cf67a5aa9fed34335fea22d4673f30f10c
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
    <view class="index">
        <view class="menu">
            <view class="menu_list" v-for="(row, i) in Menu" :key="i">
                <view class="menu_list_head">
                    <span>{{row.label}}</span>
                </view>
                <div class="menu_list_list">
                    <view class="menu_list_item" v-for="item in row.children" :key="item.id" @click="jump(item)">
                        <image :src="item.icon" mode="widthFix" />
                        <span>{{item.label}}</span>
                    </view>
                    <view class="menu_list_zw"></view>
                    <view class="menu_list_zw"></view>
                    <view class="menu_list_zw"></view>
                </div>
            </view>
        </view>
        <myTabbar :index="1" />
    </view>
</template>
 
<script>
    import myTabbar from "@/components/myTabber.vue"
    import { mapState } from 'vuex'
    
    export default {
        components: {
            myTabbar
        },
        computed: mapState([
            'Menu'
        ]),
        onReady() {
            console.log(this.Menu)
        },
        data() {
            return {
                list: [
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    }
                ]
            };
        },
        onLoad() {
            uni.hideTabBar()
            // uni.login({
            //     success: data => {
            //         this.wxLogin(data.code)
            //     },
            //     fail: err => {
            //         uni.$u.toast(err)
            //     }
            // })
        },
        methods: {
            
            // wxLogin(code) {
            //     wxEmpower({code})
            //         .then(res => {
            //             this.openId = res.openid
            //             if (res.userInfo) {
            //                 this.$store.commit('SETTOKEN', res.userInfo.token)
            //                 this.$store.commit('SETUSERINFO', res.userInfo)
            //                 uni.navigateTo({
            //                     url:'/pages/projectList/projectList'
            //                 })
            //             } 
            //         })
            //         .catch(err => {
            //             uni.$u.toast(err)
            //         })
            // }
        }
    }
</script>
<style>
    page {
        background-color: #F7F7F7 !important;
    }
</style>
<style scoped lang="scss">
.index {
    width: 100%;
    .menu {
        width: 100%;
        display: flex;
        flex-direction: column;
        .menu_list {
            display: flex;
            flex-direction: column;
            padding: 30rpx;
            box-sizing: border-box;
            margin-bottom: 20rpx;
            background: white;
            &:last-child {
                margin-bottom: 0;
            }
            .menu_list_head {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 40rpx;
                span {
                    font-size: 32rpx;
                    font-family: PingFangSC-Medium, PingFang SC;
                    font-weight: 500;
                    color: #222222;
                }
            }
            .menu_list_list {
                width: 100%;
                display: flex;
                align-items: center;
                flex-wrap: wrap;
                justify-content: space-between;
                .menu_list_zw {
                    width: 20%;
                    height: 0;
                }
                .menu_list_item {
                    width: 20%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    margin-top: 40rpx;
                    &:nth-child(1) {
                        margin: 0;
                    }
                    &:nth-child(2) {
                        margin: 0;
                    }
                    &:nth-child(3) {
                        margin: 0;
                    }
                    &:nth-child(4) {
                        margin: 0;
                    }
                    &:nth-child(5) {
                        margin: 0;
                    }
                    image {
                        width: 88rpx;
                        height: 88rpx;
                        border-radius: 24rpx;
                        overflow: hidden;
                    }
                    span {
                        font-size: 24rpx;
                        font-weight: 400;
                        color: #333333;
                        margin-top: 16rpx;
                    }
                }
            }
        }
    }
}
</style>