<view class="Usetop">
    <image class="Usetop-back" mode="widthFix" src="/static/imgs/uaer_back.png"></image>
    <view class="Usetop-range" style="padding-top:{{barHeight + jiaonangheight}}px;">
        <view class="Usetop-cont" wx:if="{{userLogin}}">
            <view class="Usetop-head {{identityId == '1' ? 'active' : ''}}">
                <image class="Usetop-head-avatar" bindtap="updImg" src="{{avatar ? avatar : '/static/imgs/default_myHead.png'}}" mode="aspectFill"></image>
            </view>
            <view class="Usetop-text">
                <view class="Usetop-text-name">
                    {{nickName}}
                    <!--1为游客  2为普通会员  3为月卡会员  4为季卡会员  5为年卡会员 -->
                    <image wx:if="{{identityId == '2'}}" src="/static/icons/member_02.png" mode="widthFix"></image>
                    <image wx:elif="{{identityId == '3'}}" src="/static/icons/member_03.png" mode="widthFix"></image>
                    <image wx:elif="{{identityId == '4'}}" src="/static/icons/member_04.png" mode="widthFix"></image>
                    <image wx:elif="{{identityId == '5'}}" src="/static/icons/member_05.png" mode="widthFix"></image>
                    <image wx:else src="/static/icons/member_01.png" mode="widthFix"></image>
                </view>
                <view class="Usetop-text-time" wx:if="{{identityId != '1' || identityId == '2'}}">
                    {{identityShow.times.name}}会员有效期至 {{identityShow.times.ended_at}}
                </view>
                <view class="Usetop-text-time" wx:else>
                    暂未开通会员
                </view>
            </view>
        </view>
        <view class="Usetop-cont" wx:else>
            <view class="Usetop-head">
                <image class="Usetop-head-avatar" bindtap="updImg" src="../../static/imgs/default_myHead.png" mode="aspectFill"></image>
            </view>
            <view class="Usetop-text">
                <navigator hover-class="none" url="/pages/login/index" class="Usetop-text-name">
                    请先登录
                </navigator>
                <view class="Usetop-text-time">
                    登录后开通会员
                </view>
            </view>
        </view>
    </view>
</view>

<!-- 公告 -->
<view class="notice">
    <view class="notice-cont">
        <swiper class="notice-cont-swiper" autoplay vertical interval="4000" circular duration="1000">
            <block wx:for="{{vipsData}}" wx:key="vipsData">
                <swiper-item catchtouchmove="catchTouchMove">
                    <view class="swiper-item">
                        <image class="notice-cont-avatar" src="{{item.avatar ? item.avatar : '/static/imgs/default_myHead.png'}}" mode="aspectFill"></image>
                        <view class="notice-cont-name">用户<text>{{item.nickname}}</text>成为了{{item.identity.name}}</view>
                    </view>
                </swiper-item>
            </block>
        </swiper>
    </view>
</view>

<!-- 权益 -->
<view class="interest">
    <view class="interest-title">开通会员立享<text>{{interestData.rules.length}}</text>大权益</view>
    <view class="interest-cont">
        <swiper class="interest-item" interval="4000" circular duration="1000">
            <swiper-item>
                <view class="interest-label" wx:for="{{interestData.rules}}" wx:key="rules">
                    <image class="interest-label-icon" src="{{item.cover}}" mode="widthFix"></image>
                    <view class="interest-label-name">{{item.text}}</view>
                </view>
            </swiper-item>
        </swiper>
        <view class="interest-tab">
            <view class="interest-tab-title">会员充值</view>
            <view class="interest-tab-item">
                <view class="interest-tab-label {{tabType == item.id ? 'active' : ''}}" bindtap="typeClick" data-type="{{item.id}}" wx:for="{{identitiesData}}" wx:key="identitiesData">
                    <view class="interest-tab-name">
                        锶享会·{{item.name}}
                    </view>
                    <view class="interest-tab-number">
                        <text>￥</text>{{item.price}}
                    </view>
                    <view class="interest-tab-text">{{item.bottle}}瓶({{item.stock}}箱)</view>
                </view>
            </view>
        </view>
    </view>
</view>

<!-- 按钮 -->
<view class="open">
    <block wx:if="{{userLogin}}">
        <view class="open-btn" bindtap="userNav" data-url="./open/open?identity_id={{interestData.identity_id}}" wx:if="{{interestData.can.open}}"><text>￥{{interestData.price}}</text>立即开通</view>
        <block wx:else>
            <navigator hover-class="none" url="./open/open?identity_id={{interestData.identity_id}}" class="open-btn" wx:if="{{interestData.can.renew}}">
                立即续费
            </navigator>
            <block wx:else>
                <block wx:if="{{interestData.can.re_open}}">
                    <navigator url="./cause/cause?identity_id={{interestData.identity_id}}&order_id={{interestData.identity_order.order_id}}" hover-class="none" class="open-btn">修改{{interestData.buttonText}}</navigator>
                    <view class="seeCause" data-text="{{interestData.identity_order.reject_reason}}" bindtap="tapCause">查看驳回原因</view>
                </block>
                <view class="open-btn active" wx:else>
                    {{interestData.buttonText}}
                </view>
            </block>
        </block>
    </block>
    <navigator class="open-btn" url="/pages/login/index" wx:else><text>￥{{interestData.price}}</text>立即开通</navigator>
</view>