<view class="home-page page-container">
    <view class="list-loading text-center" wx:if="{{ pageLoading }}">
        <van-loading size="24px">加载中...</van-loading>
    </view>
    <view wx:else>
        <!-- 头部 -->
        <view class="header-view">
            <view class="user-view">
                <view class="chatHeads-view fl">
                    <image class="chatHeads-img" src="{{ customer.chatHeads }}" />
                </view>
                <view class="customer-info fl">
                    <view class="customer-nick-name yichu">{{ customer.nickName }}</view>
                    <view class="customer-address">{{ customer.province + (customer.city ? '·' + customer.city : '') }}</view>
                </view>
            </view>
            <view class="service-project" wx:if="{{ !!customer.serviceProject }}">
                服务项目：{{ customer.serviceProject }}
            </view>
            <view class="gird-view">
                <view class="gird-view-item fl">
                    <view class="gird-view-num">{{ postDemand }}</view>
                    <view class="gird-view-text">发布需求</view>
                </view>
                <view class="gird-view-item fl">
                    <view class="gird-view-num">{{ collectDemand }}</view>
                    <view class="gird-view-text">关注</view>
                </view>
                <view class="gird-view-item fl">
                    <view class="gird-view-num">{{ beCollectDemand }}</view>
                    <view class="gird-view-text">被关注</view>
                </view>
                <view class="gird-view-item fl">
                    <view class="gird-view-num">{{ totalPageView }}</view>
                    <view class="gird-view-text">被浏览量</view>
                </view>
            </view>
            <view class="list-certification" wx:if="{{ customer.isPartner }}">
                <image class="certification-img" src="/images/home/certification-icon.png" />
                平台认证
            </view>
        </view>
        <!-- 需求行 -->
        <view class="demands-view">
            <image class="demands-img" src="/images/home/demands-icon.png" />
            <text class="demands-text">{{ isOther ? '需求' : '我的需求'}}</text>
        </view>
        <!-- 内容 -->
        <view class="not-data" wx:if="{{ listData.length < 1 }}">
            <image class="not-data-img" src="/images/home/not-data.png" />
            <view class="not-info">
                该用户没有发布任何需求
            </view>
        </view>
        <view wx:else>
            <view class="list-view" wx:for="{{ listData }}" wx:key="index">
                <listItem item="{{ item }}" bind:getItem="goDetails" pageStatus="homepage" isOther="{{ isOther }}" customerId="{{ loginCustomerId }}"/>
            </view>
            <view class="text-center" wx:if="{{ itemLoading }}">
                <van-loading size="24px">加载中...</van-loading>
            </view>
            <view class="list-finished text-center" wx:if="{{ isFinished }}">
                <image class="finished-img" src="/images/home/finished-icon.png" />
                没有更多啦~
            </view>
        </view>
        <!-- 底部 -->
        <view class="foot-view">
            <van-button 
                block 
                color="#5e73e5" 
                round 
                bind:click="footBtnClick" 
            >
                {{ isOther ? '立即沟通' : '发布需求'}}
            </van-button>
        </view>
    </view>
</view>