Lou
2023-11-03 f87b4085b9a27a940aff62463d4093f80658b957
首页居民、场所负责人默认首条数据
1 files modified
34 ■■■■ changed files
pages/home/index.vue 34 ●●●● patch | view | raw | blame | history
pages/home/index.vue
@@ -1,8 +1,10 @@
<template>
    <view class="">
        <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder  @leftClick="selectBoxShow = !selectBoxShow">
            <view slot="left" class="flex">
                <text class="top">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}</text>
        <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder
            @leftClick="selectBoxShow = !selectBoxShow">
            <view slot="left" class="top flex">
                <view class="top-text f-30 fw">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
                </view>
                <u-icon name="/static/icon/change-icon.png"></u-icon>
            </view>
        </u-navbar>
@@ -68,7 +70,8 @@
                    </view>
                </view>
                <view class="flex flex-wrap">
                    <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"  @click.native="pushPage(item)">
                    <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
                        @click.native="pushPage(item)">
                        <u-icon name="/static/icon/floor.png" width="32rpx" height="32rpx"></u-icon>
                        <text class="cell-text f-26 c-ff">{{item.title}}</text>
                    </view>
@@ -369,7 +372,10 @@
                        this.curSelectSite = dataList[0].children[0];
                        this.getHouseDataList(dataList[0].children[0].id)
                        this.buildSiteColumn(dataList[0].children, index + 1)
                    } else {
                        this.curSelectSite = dataList[0];
                    }
                }
            },
@@ -491,7 +497,10 @@
            },
            
            // 页面跳转
            pushPage({id, title}) {
            pushPage({
                id,
                title
            }) {
                if (id !== void 0) {
                    let url = `/subPackage/house/list/index?id=${id}&title=${title}`
                    this.$u.func.globalNavigator(url, "navTo")
@@ -499,7 +508,11 @@
            },
            
            // 页面跳转
            toPage({id, title, path }) {
            toPage({
                id,
                title,
                path
            }) {
                let url = `${path}`
                this.$u.func.globalNavigator(url, "navTo")
                if (id !== void 0) {
@@ -518,9 +531,14 @@
<style lang="scss" scoped>
    .top {
        width: 530rpx;
        .top-text {
            max-width: 85%;
        margin-right: 20rpx;
        font-size: 32rpx;
        font-weight: bold;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
    .swiper {