<!-- 头部 -->
<view class="userTop {{userLogin ? '' : 'active'}}" wx:if="{{userLogin}}">
    <!-- <image class="userTop-back" src="https://cdn.shuiganying.com/images/2023/04/04/f7b8292135e06241fa2ccad8633200d4.png" mode="aspectFill"></image> -->
    <navigator class="userTop-url" hover-class="none" url="./setup/setup">
        <view class="userTop-cont">
            <view class="userTop-head">
                <image src="{{userData.avatar ? userData.avatar: '/static/imgs/userHead.png'}}" mode="aspectFill"></image>
                <view class="userTop-head-vip" wx:if="{{userData.identity.id == 2}}">{{userData.identity.name}}</view>
            </view>
            <view class="userTop-name">
                {{userData.nickname}}<image class="userTop-name-vip" mode="widthFix" wx:if="{{userData.identity.id > 2}}" src="{{userData.identityShow.right.cover}}"></image>
            </view>
        </view>
    </navigator>
    <view class="bar">
        <view class="barCont">
            <block wx:if="{{userData.identity.id <= 2}}">
                <view class="barTips">
                    <view class="barTips-name">购买产品<text>{{Progress.now}}</text>瓶</view>
                    <view class="barTips-text">累计购买{{Progress.total}}瓶可成为创客</view>
                </view>
                <view class="barBack"><text style="width: {{Progress.progress + '%'}};"></text></view>
            </block>
            <block  wx:else>
                <view class="barTips barTips-center">
                    <view class="barTips-name">{{Progress.text}}</view>
                </view>
            </block>
        </view>
        <view class="barBtn active" wx:if="{{userData.identity.id <= 2}}">努力中</view>
        <navigator wx:else class="barBtn barBtn-active" hover-class="none" target="miniProgram" app-id="wx256d29149b783fad" path="pages/index/index" version="release">
            经销商通道
        </navigator>
    </view>
</view>

<!-- active -->
<navigator hover-class="none" url="/pages/login/index" class="userTop active" wx:else>
    <image class="userTop-back" src="https://cdn.shuiganying.com/images/2023/04/04/f7b8292135e06241fa2ccad8633200d4.png" mode="widthFix"></image>
    <view class="userTop-cont">
        <image class="userTop-head" src="/static/imgs/userHead.png"></image>
        <view class="userTop-name">登录 / 注册</view>
    </view>
</navigator>

<!-- 主内容 -->
<view class="userCont {{userLogin ? '' : 'active'}}">
    <!-- 订单 -->
    <view class="userOrder">
        <view class="userOrder-cont">
            <view class="userOrder-title">
                <view class="userOrder-title-name">我的订单</view>
                <view hover-class="none" bindtap="userNav" data-url="/pages/order/index?list_type=" class="userOrder-title-more">全部<image class="userOrder-title-arrow" src="/static/icons/orderArrow.png" mode="widthFix"></image>
                </view>
            </view>
            <view class="userOrder-list">
                <view class="userOrder-item" bindtap="userNav" data-url="/pages/order/index?list_type=unpay">
                    <image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/c4699c1348369a7a2e6ff0a76adf00e5.png" mode="widthFix"></image>
                    <view class="userOrder-item-name">待付款</view>
                    <block wx:if="{{userLogin}}">
                        <view class="userOrder-item-number" wx:if="{{ordersData.init > 0}}">{{ordersData.init}}</view>
                    </block>
                </view>
                <view class="userOrder-item" bindtap="userNav" data-url="/pages/order/index?list_type=paid">
                    <image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/3951244643921a98d3ae4bd35576041a.png" mode="widthFix"></image>
                    <view class="userOrder-item-name">待发货</view>
                    <block wx:if="{{userLogin}}">
                        <view class="userOrder-item-number" wx:if="{{ordersData.paid > 0}}">{{ordersData.paid}}</view>
                    </block>
                </view>
                <view class="userOrder-item" bindtap="userNav" data-url="/pages/order/index?list_type=delivered">
                    <image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/49397fe2e8df547425d97f83f35da099.png" mode="widthFix"></image>
                    <view class="userOrder-item-name">待收货</view>
                    <block wx:if="{{userLogin}}">
                        <view class="userOrder-item-number" wx:if="{{ordersData.delivered > 0}}">{{ordersData.delivered}}</view>
                    </block>
                </view>
                <view class="userOrder-item" bindtap="userNav" data-url="/pages/order/index?list_type=signed">
                    <image class="userOrder-item-icon" src="https://cdn.shuiganying.com/images/2023/04/04/cf133394e075d4acafc2426cc777dbaf.png" mode="widthFix"></image>
                    <view class="userOrder-item-name">已签收</view>
                </view>
            </view>
        </view>
    </view>

    <!-- 展示数据 -->
    <view class="entry">
        <navigator hover-class="none" url="/pages/report/index" open-type="switchTab" class="entry-item">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/1cca1dbeff0f7271de5869fcb0b517e3.png"></image>
            <view class="entry-item-name">报告查看</view>
        </navigator>
        <view class="entry-item" bindtap="userNav" data-url="/pages/health/collect/collect">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/679705fa9ff30ae9619b7d4b49b63e10.png"></image>
            <view class="entry-item-name">我的收藏</view>
        </view>
        <view class="entry-item" bindtap="userNav" data-url="/pages/health/praise/praise">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/382a79a7a418ca132b7dca846420e500.png"></image>
            <view class="entry-item-name">我的点赞</view>
        </view>
        <view class="entry-item" bindtap="userNav" data-url="/pages/mall/coupon/coupon">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/389e7995b42fc23a1c1ebd35fa232905.png"></image>
            <view class="entry-item-name">兑换券</view>
        </view>
        <view class="entry-item" bindtap="userNav" data-url="/pages/site/index">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/98126e111b421d877f14c15e4769cfcc.png"></image>
            <view class="entry-item-name">地址管理</view>
        </view>
        <navigator hover-class="none" url="/pages/health/index" class="entry-item">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/c4efd36af444df550cb866f09c54edd7.png"></image>
            <view class="entry-item-name">健康知识</view>
        </navigator>
        <view class="entry-item" bindtap="userNav" data-url="./code/code">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/88ef7b720e1713fa5be17d509845d6eb.png"></image>
            <view class="entry-item-name">邀请好友</view>
        </view>
        <view class="entry-item" bindtap="parentTap" wx:if="{{userData.parent != null}}">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/84e3bad4916135db56716d914a4dc8e4.png"></image>
            <view class="entry-item-name">推荐人</view>
        </view>
        <!-- <navigator class="entry-item" hover-class="none" target="miniProgram" app-id="wx256d29149b783fad" path="pages/index/index" version="release">
            <image class="entry-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/84e3bad4916135db56716d914a4dc8e4.png"></image>
            <view class="entry-item-name">申请代理</view>
        </navigator> -->
    </view>

    <!-- 常用工具 -->
    <view class="tool">
        <view class="tool-title">
            常用工具
        </view>
        <view class="tool-list">
            <view class="tool-item" bindtap="userNav" data-url="/pages/water/index">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/07/14/3848be12fe8f1cd17099ebdc013c06ab.png"></image>
                <view class="tool-item-name">水滴账户</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </view>
            <block wx:if="{{userData.can_share}}">
                <view class="tool-item" wx:if="{{userLogin}}">
                    <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/13/bb06808b4b3f3b71258ffab830e37973.png"></image>
                    <view class="tool-item-name">我的邀请码</view>
                    <view class="tool-item-code">
                        {{userData.invite}}<view class="tool-item-copy" bindtap="copyUrl" data-no="{{userData.invite}}">复制</view>
                    </view>
                </view>
            </block>
            <view class="tool-item" bindtap="userNav" data-url="./setup/setup">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/92dc81e66f90df7e106d69745de2ea48.png"></image>
                <view class="tool-item-name">用户设置</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </view>
            <navigator class="tool-item" hover-class="none" url="./help/help">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/7c86674c3ee1b2fdd1bb1459070e8ce3.png"></image>
                <view class="tool-item-name">帮助中心</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </navigator>
            <navigator class="tool-item" hover-class="none" url="./about/about">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/5db51a2cc893ba3fa0a80e4341c2b201.png"></image>
                <view class="tool-item-name">关于水感应</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </navigator>
            <view class="tool-item btn" bindtap="callCenter">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/5f22c6b7f07fd58741d2b6d629af5be5.png"></image>
                <view class="tool-item-name">我的客服</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </view>
            <view class="tool-item" bindtap="outLogin" wx:if="{{userLogin}}">
                <image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/04/bd88c54abcabcae95d1f616c0f9d9dd8.png"></image>
                <view class="tool-item-name">退出登录</view>
                <image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
            </view>
        </view>
    </view>
</view>

<!-- 推荐人弹出 -->

<view class="parentEject {{parentStatus ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="parentPop {{parentStatus ? 'active' : ''}}" catchtouchmove='true'>
    <image class="parentPop-back" src="https://cdn.shuiganying.com/images/2023/04/28/7ef0020933eeb4da3f9ba5f319a4e8a5.png" mode="aspectFill"></image>
    <image class="parentPop-close" bindtap="parentTap" src="https://cdn.shuiganying.com/images/2023/04/27/c7aaa09b4ccd4bbd298b0e18aae68cfb.png" mode="widthFix"></image>
    <view class="parentPop-cont">
        <image class="parentPop-img" src="https://cdn.shuiganying.com/images/2023/04/27/988c792478a648e2df52ab90c60ea30e.png" mode="widthFix"></image>
        <image class="parentPop-head" src="{{userData.parent.avatar}}" mode="widthFix"></image>
        <view class="parentPop-nick">{{userData.parent.nickname}}</view>
        <view class="parentPop-user" bindtap="clickcall" data-tel="{{userData.parent.username}}">{{userData.parent.username}}</view>
    </view>
</view>