<!-- pages/myPage/myPage.wxml -->
<view class="my-page page-container">
    <!-- 顶部 -->
    <view class="header card-view" wx:if="{{ isLogin }}">
        <view class="chatHeads fl">
            <image class="chatHeads-img" src="{{ user.chatHeads }}" />
        </view>
        <view class="user-info fl">
            <view class="user-name-box fl" wx:if="{{ user.isPartner }}">
                <view class="user-name need yichu fl">{{ user.nickName }}</view>
                <view class="user-isPartner fl">
                    <image class="certification-img" src="/images/home/certification-icon.png" />
                    平台认证
                </view>
            </view>
            <view class="user-name-box fl" wx:else>
                <view class="user-name yichu fl">{{ user.nickName }}</view>
            </view>
            <view class="user-address fl">{{ user.province + (user.city ? ' · ' + user.city : '') }}</view>
            <view class="show-home-page fl" bindtap="goRouterPage" data-code="homepage">
                <image class="home-page-img" src="/images/home/home-page-icon.png" />
                查看主页 >>
            </view>
        </view>
        <view class="exit-view" bindtap="exitLogin">
            <image class="exit-img" src="/images/home/exit-icon.png" />
            退出
        </view>
    </view>
    <view class="header card-view clearfix" wx:else>
        <image class="not-login-img fl" src="/images/home/not-login.png" />
        <view class="not-login-view fl">
            <view class="not-login-info">您尚未登录,请登陆后操作</view>
            <view class="login-btn-view">
                <button class="login-btn fl" bindtap="goLogin">立即登录</button>
            </view>
        </view>
    </view>
    <!-- 内容 -->
    <view class="content card-view">
        <view class="li-view" wx:for="{{ listData }}" wx:key="*this" bindtap="goRouterPage" data-code="{{ item.code }}">
            <image class="{{ item.code }}-img" src="/images/home/{{ item.code }}-icon.png" />
            {{ item.title }}
            <view class="right-icon fr">
                <van-icon name="arrow" />
            </view>
        </view>
    </view>
    <tabBar currentIndex="{{currentIndex}}"></tabBar>
</view>