index.wxml
2.66 KB
<wxs src="../../wxs/helper.wxs" module="helper" />
<view class="home-page {{notLogin ? 'no-login' : ''}}">
<view class="new-user-info-bar">
<view wx:if="{{notLogin}}">
<image class="avatar" src="../../static/images/my/not-login.png"></image>
<view class="user-name login-text">登录/注册</view>
<my-login></my-login>
</view>
<block wx:else>
<view class="user-name">{{userInfo.nickName || userInfo.phoneNum}}</view>
<view class="grow-score">
<image wx:if="{{userInfo.vipImg}}" class="card-type" src="{{userInfo.vipImg}}"></image>
<text>成长值:{{userInfo.growth}}</text>
</view>
<image wx:if="{{userInfo.avatarUrl == ''}}" class="avatar" src="../../static/images/my/not-login.png"></image>
<image wx:if="{{userInfo.avatarUrl != '' && userInfo.defaultAvatar}}" class="avatar"
src="{{userInfo.avatarUrl}}"></image>
<image wx:if="{{userInfo.avatarUrl != '' && !userInfo.defaultAvatar}}" class="avatar"
src="{{helper.image(userInfo.avatarUrl, 120, 120)}}"></image>
<image class="my-qrcode" bindtap="tapMyQRCode" src="../../static/images/my/qrcode.png"></image>
</block>
</view>
<view class="nav-list">
<view class="nav-item" catchtap="tapNavItem" data-type="yohoCoin">有货币<image class="arrow" src="../../static/images/my/arrow-right.png"></image><my-login wx:if="{{notLogin}}"></my-login><text wx:else class="card-num">{{coinNum}}</text></view>
<view class="nav-item" catchtap="tapNavItem" data-type="couponList">优惠券 <image class="arrow" src="../../static/images/my/arrow-right.png"></image><my-login wx:if="{{notLogin}}"></my-login><text wx:else class="card-num">{{discountCoupon}}</text></view>
<view class="nav-item" catchtap="tapNavItem" data-type="experience">体验券<image class="arrow" src="../../static/images/my/arrow-right.png"></image><my-login wx:if="{{notLogin}}"></my-login><text wx:else class="card-num">{{experienceCoupon}}</text></view>
<view class="nav-item" catchtap="tapNavItem" data-type="order">我的订单<image class="arrow"
src="../../static/images/my/arrow-right.png"></image><my-login wx:if="{{notLogin}}"></my-login></view>
<view class="nav-item" catchtap="tapNavItem" data-type="setting" wx:if="{{!notLogin}}">设置<image class="arrow"
src="../../static/images/my/arrow-right.png"></image></view>
</view>
</view>