wjt
2024-06-25 244d89b41c0e0e995d38f635a126a0959b9ba25b
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
<template>
    <view class="fixed-down">
        <view  @click="activeClick(0)" :class="{ active: active == 0}">
            <image src="/static/qiye/q03.png" mode="heightFix" v-if="active != 0"></image>
            <image src="/static/qiye/q04.png" mode="heightFix" v-if="active == 0"></image>
            <view>首页</view>
        </view>
        <view @click="activeClick(1)" :class="{ active: active == 1}">
            <image src="/static/qiye/q01.png" mode="heightFix" v-if="active != 1"></image>
            <image src="/static/qiye/q02.png" mode="heightFix" v-if="active == 1"></image>
            <view>执法记录</view>
        </view>
        <view @click="activeClick(2)" :class="{ active: active == 2}">
            <image src="/static/policy/user.png" mode="heightFix" v-if="active != 2"></image>
            <image src="/static/policy/user-select.png" mode="heightFix" v-if="active == 2"></image>
            <view>我的</view>
        </view>
    </view>
</template>
 
<script>
    export default {
        props:{
            activeNumber:{
                 type: [String, Number]
            }
        },
        data() {
            return {
                active: this.activeNumber
            }
        },
        methods: {
            
            activeClick(number) {
                if(this.active == number){
                    return
                }
                this.active = number
                if(number==0){
                    uni.redirectTo({
                        url: `/qiye/qiyeIndex/qiyeIndex`
                    })
                }
                if(number==1){
                    uni.redirectTo({
                        url: `/qiye/record/record`
                    })
                }
                if(number==2){
                    uni.redirectTo({
                        url: `/qiye/my/my`
                    })
                }
                this.$emit('update:activeNumber', number)
            }
        }
    }
</script>
 
<style scoped lang="scss">
    .fixed-down{
        position: fixed;
        bottom: 0;
        width: 100%;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10rpx 0 40rpx;
        background-color: white;
        font-size: 20rpx;
        color: #7E8596FF;
        &>view{
            text-align: center;
        }
        .active{
            color: #1171E0FF;
        }
        image{
            height: 58rpx;
            width: 58rpx;
        }
        .code{
            width: 108rpx;
            height: 108rpx;
            position: absolute;
            top: -20rpx;
            left: 0;
        }
        .relative{
            position: relative;
            width: 108rpx;
            height: 108rpx;
        }
    }
</style>