k94314517
2025-07-04 50fb58286ed3b718c39a97e0987ee7561a295651
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<template>
    <view class="tabBar">
        <view class="tabBar_func" v-if="isShow">
            <view></view>
            <view class="tabBar_func_box">
                <view class="func_list">
                    <view class="func_list_item" @click="jump(3)">
                        <view class="func_list_item_info">
                            <text>在线报案</text>
                            <text>方便迅速</text>
                        </view>
                        <image src="/static/background/home_ic_baoan@2x.png" mode="widthFix"></image>
                    </view>
                    <view class="func_list_item" @click="jump(1)">
                        <view class="func_list_item_info">
                            <text>投保申请</text>
                            <text>简单便捷</text>
                        </view>
                        <image src="/static/background/hom22e_ic_toubao@2x.png" mode="widthFix"></image>
                    </view>
                    <view class="func_list_item" @click="jump(4)">
                        <view class="func_list_item_info">
                            <text>加减保申请</text>
                            <text>增加/减少投保人</text>
                        </view>
                        <image src="/static/background/home_ic_jiajianbao@2x.png" mode="widthFix"></image>
                    </view>
                    <view class="func_list_item" @click="jump(6)">
                        <view class="func_list_item_info">
                            <text>更换派遣\n单位</text>
                        </view>
                        <image src="/static/background/home_ic_huanch1angjilu@2x.png" mode="widthFix"></image>
                    </view>
                </view>
                <image class="tabBar_func_close" @click="closes" src="/static/icon/ic_cl1ose@2x.png" mode="widthFix"></image>
            </view>
        </view>
        <view class="tabBar_list">
            <view v-for="(item,index) in tabBar" :key="item.url" class="tabbar_item" :class="{'active':item.url == currentPage}" @click="navTo(item)">
                <template v-if="item.url">
                    <image v-if="item.url == currentPage" :src="item.imgClick" mode="widthFix"></image>
                    <image v-else :src="item.imgNormal" mode="widthFix"></image>
                    <view class="text">{{item.text}}</view>
                </template>
                <view class="tabbar_quan" v-else>
                    <u-icon name="plus" color="#ffffff" size="24"></u-icon>
                </view>
            </view>
        </view>
        <view class="tabBar_zw"></view>
    </view>
</template>
 
<script>
    import {
        mapState
    } from 'vuex'
    export default {
        computed: {
            ...mapState(['userInfo', 'cookies'])
        },
        props: {
            currentPage: {
                type: String,
                default: 'index'
            }
        },
        data() {
            return {
                isShow: false,
                value: 1,
                tabBar: [
                    {
                        url: '/pages/index/index',
                        text: '保单',
                        imgNormal: '../../static/icon/nav_home@2x.png',
                        imgClick: '../../static/icon/nav_home_sel@2x.png'
                    },
                    {
                        url: '/pages/online_reporting/online_reporting',
                        text: '理赔',
                        imgNormal: '../../static/icon/nav_lipei@2x.png',
                        imgClick: '../../static/icon/nav_lipei_sel@2x.png'
                    },
                    {
                        url: '',
                        text: ''
                    },
                    {
                        url: '/pages/changeRecord/changeRecord',
                        text: '变更记录',
                        imgNormal: '../../static/icon/nav_biangeng@2x.png',
                        imgClick: '../../static/icon/nav_biangeng_sel@2x.png'
                    },
                    {
                        url: '/pages/mine/mine',
                        text: '我的',
                        imgNormal: '../../static/icon/nav_wode@2x.png',
                        imgClick: '../../static/icon/nav_wode_sel@2x.png'
                    }
                ]
            };
        },
        methods: {
            closes() {
                this.isShow = false
            },
            navTo(item) {
                if (!item.url) {
                    this.isShow = true
                    return
                }
                if (item.url !== this.currentPage) {
                    var isUrl = item.url
                    const that = this
                    uni.switchTab({
                        url: isUrl
                    })
                }
            },
            jump(type) {
                if (!this.cookies || !this.userInfo) {
                    uni.navigateTo({
                        url: '/pages/login/login'
                    })
                }
                switch (type) {
                    case 1:
                        uni.navigateTo({
                            url: '/pages/insuranceApplication/insuranceApplication'
                        })
                        break;
                    case 3:
                        uni.navigateTo({
                            url: '/pages/new_report/new_report'
                        })
                        break;
                    case 4:
                        uni.navigateTo({
                            url: '/pages/addition_subtraction_application/addition_subtraction_application'
                        })
                        break;
                    case 6:
                        uni.navigateTo({
                            url: '/pages/factoryChange/factoryChange'
                        })
                        break;
                }
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    //导航栏设置
    $isRadius: 20upx; //左上右上圆角
    $isWidth: 100vw; //导航栏宽度
    $isBorder: 0px solid white; //边框 不需要则设为0px
    $isBg: white; //背景
 
    // 选中设置
    $chooseTextColor: #222222; //选中时字体颜色
    $chooseBgColor: transparent; //选中时背景颜色 transparent为透明
 
    //未选中设置
    $normalTextColor: #312F32; //未选中颜色
 
    .tabBar {
        width: 100vw;
        // height: 110upx;
        // padding-bottom: env(safe-area-inset-bottom);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 988;
        background-color: $isBg;
        color: $normalTextColor;
        display: flex;
        flex-direction: column;
        
        .tabBar_func {
            width: 100vw;
            height: 100vh;
            position: fixed;
            padding-bottom: env(safe-area-inset-bottom);
            box-sizing: border-box;
            z-index: 9999;
            top: 0;
            left: 0;
            background: rgba(255,255,255,0);
            backdrop-filter: blur(5px);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            .tabBar_func_box {
                width: 100%;
                padding: 0 30rpx;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                align-items: center;
                .tabBar_func_close {
                    width: 118rpx;
                    height: 118rpx;
                    margin-top: 62rpx;
                }
                .func_list {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    flex-wrap: wrap;
                    .func_list_item {
                        width: 48%;
                        height: 160rpx;
                        position: relative;
                        margin-bottom: 20rpx;
                        padding: 24rpx 28rpx;
                        box-sizing: border-box;
                        .func_list_item_info {
                            display: flex;
                            flex-direction: column;
                            position: relative;
                            z-index: 9999;
                            text {
                                &:nth-child(1) {
                                    font-weight: 500;
                                    font-size: 32rpx;
                                    color: #222222;
                                }
                                &:nth-child(2) {
                                    font-weight: 400;
                                    font-size: 24rpx;
                                    color: #768188;
                                }
                            }
                        }
                        image {
                            width: 100%;
                            height: 100%;
                            position: absolute;
                            top: 0;
                            left: 0;
                        }
                    }
                }
            }
        }
        
        .tabBar_zw {
            width: 100vw;
            height: env(safe-area-inset-bottom);
        }
        
        .tabBar_list {
            width: 100vw;
            height: 110upx;
            background-color: $isBg;
            color: $normalTextColor;
            display: flex;
            justify-content: space-around;
            box-sizing: border-box;
            overflow: hidden;
            
            .tabbar_item {
                flex: 1;
                font-size: 12px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                position: relative;
            }
            
            .tabbar_quan {
                width: 90rpx;
                height: 90rpx;
                display: flex;
                align-items: center;
                justify-content: center;
                background: #437CB3;
                border-radius: 50%;
                border: 6rpx solid rgba(67,124,179,0.14);
            }
            
            image {
                width: 48upx;
                height: 48upx;
            }
        }
    }
</style>