Lou
2024-03-19 8d8ae4c1189baadd5b8267a9643af674bd4786c0
更新
4 files modified
1 files added
45 ■■■■■ changed files
components/tabBar/tabBar.vue 8 ●●●● patch | view | raw | blame | history
pages/home/index.vue 19 ●●●●● patch | view | raw | blame | history
pages/statistics/index.vue 10 ●●●● patch | view | raw | blame | history
pages/user/center.vue 8 ●●●● patch | view | raw | blame | history
static/img/block-bg.png patch | view | raw | blame | history
components/tabBar/tabBar.vue
@@ -1,9 +1,9 @@
<template>
    <view>
        <u-tabbar class="custom-tabbar" zIndex="100" :value="current" :fixed="true" :active-color="activeColor"
        <u-tabbar class="custom-tabbar" zIndex="9999" :value="current" :fixed="true" :active-color="activeColor"
            :inactive-color="inactiveColor">
            <u-tabbar-item :text="item.name" @click="changeTabbar(item.url,index)" v-for="(item,index) in tabbarList"
                :key="index">
            <u-tabbar-item :text="item.name" @click="changeTabbar(item.url,index,item.name)"
                v-for="(item,index) in tabbarList" :key="index">
                <image class="tabbar-icon" slot="active-icon" :src="item.iconPathSelected"></image>
                <image class="tabbar-icon" slot="inactive-icon" :src="item.iconPath"></image>
            </u-tabbar-item>
@@ -45,7 +45,7 @@
                uni.switchTab({
                    url
                })
                this.$emit("change", index)
                this.$emit("change", name)
            }
        }
    }
pages/home/index.vue
@@ -65,10 +65,10 @@
                <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 3">
                    <view @click="scan" class="block-item"
                        style="width:47%; background:linear-gradient( #00176C 0%, rgba(1,97,203,0.2) 99%)">
                        <!--     <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill"
                            style="width:100%;" /> -->
                    <view @click="scan" class="block-item">
                        <!--     <image class="block-item-bg" src="/static/img/block-bg.png" mode="aspectFill"
                            style="width:390rpx; height:227rpx;" /> -->
                        <view class="block-item-box flex a-i-c j-c-c " style="width:100%;">
                            <u-icon name="/static/icon/nav-05.png" width="72rpx" height="72rpx"></u-icon>
                            <view class="item-text flex f-d-c j-c-s-b" style="margin-left: 20rpx;">
@@ -80,7 +80,7 @@
                    <view class="block-item" @click="navigatorPage('/subPackage/task/index')"
                        style="width:47%;background:linear-gradient( #00176C 0%, rgba(1,97,203,0.2) 99%)">
                        <!-- <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill"
                        <!-- <image class="block-item-bg" src="/static/img/block-bg.png" mode="aspectFill"
                            style="width:100%;" /> -->
                        <view class="block-item-box flex a-i-c j-c-c" style="width:100%;">
                            <u-icon name="/static/icon/nav-12.png" width="72rpx" height="72rpx"></u-icon>
@@ -263,7 +263,7 @@
                @close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
                @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
        </view>
        <tabBar :current="0" :list="tabList" />
        <tabBar :current="0" :list="tabList" @change="changeTabbar" />
    </view>
</template>
@@ -623,6 +623,11 @@
            //     });
            // },
            changeTabbar() {
                uni.$emit('refreshStatistics')
            },
            //获取待办事项数量
            getTaskCount() {
@@ -661,7 +666,7 @@
                this.getBanner();
                this.getSiteList()
                this.getNoticeList()
                this.getTaskCount();
                // this.getTaskCount();
            },
            getBanner() {
pages/statistics/index.vue
@@ -260,6 +260,7 @@
                tabList: []
            }
        },
        // onTabItemTap(e) {
        //     // tab 点击时执行,此处直接接收单击事件
        //     console.log(e)
@@ -267,15 +268,14 @@
        // },
        onLoad() {
            this.tabList = getTabbarList(2);
        },
        onShow() {
            this.refreshData();
            // uni.$on('refreshStatistics', () => {
            //     this.refreshData();
            // })
        },
        methods: {
            changeTabbar(e) {
                console.log("==>", e)
                // this.refreshData();
pages/user/center.vue
@@ -67,7 +67,7 @@
                </u-cell>
            </u-cell-group>
        </view>
        <tabBar :current="2" :list="tabList" />
        <tabBar :current="2" :list="tabList" @change="changeTabbar" />
    </view>
</template>
@@ -110,7 +110,7 @@
        onShow() {
            // this.getUserInfo();
            let role = uni.getStorageSync('activeRole')
            if (role.roleAlias == "inhabitant") {
            if (role.roleName == "居民") {
                this.tabList = getTabbarList(1);
                this.roleType = 1
            } else {
@@ -126,6 +126,10 @@
        },
        methods: {
            changeTabbar() {
                uni.$emit('refreshStatistics')
            },
            setAvatar(avatar) {
                return `${minioBaseUrl}${avatar}`
            },
static/img/block-bg.png