wjt
2024-06-20 5470b3652246095d9d73d8aa03ce8830459af8c9
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
<template>
    <view class="fixed-down">
        <view  @click="activeClick(0)" :class="{ active: active == 0}">
            <view>工作台</view>
        </view>
        <view @click="scode">
            扫码
        </view>
        <view @click="activeClick(1)" :class="{ active: active == 1}">
            <view>我的</view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                active: 0
            }
        },
        methods: {
            scode() {
                uni.scanCode({
                    success: val => {
                        if(val.errMsg === 'scanCode:ok'){
                            console.log(val.result)
                        }
                    }
                })
            },
            activeClick(number) {
                this.active = number
                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-bottom: 29rpx;
        padding-top: 20rpx;
        background-color: white;
        font-size: 20rpx;
        color: #7E8596FF;
        .active{
            color: #1171E0FF;
        }
    }
</style>