home.wxml 3.93 KB
<wxs src="../../wxs/helper.wxs" module="helper"></wxs>
<scroll-view scroll-y='true' style="height: {{windowHeight}}px" bindscroll="scroll" scroll-top="{{scrollTop}}">
    <view class="container">
        <view class="my-page yoho-page">
            <view class="my-header">
                <image class="header-bg" src="../../static/images/center_login_bg.png"></image>
                <view class="user-info">
                    <block wx:if="{{!isLogin}}">
                        <button wx:if="{{!hasUnionID}}" class="login-btn"
                            open-type="getUserInfo"
                            bindgetuserinfo="getUserInfoLogin" plain="true">登录/注册</button>
                        <button wx:else class="login-btn" open-type="getPhoneNumber" 
                            bindgetphonenumber="getPhoneNumber" plain="true">登录/注册</button>
                    </block>
                    <block wx:else>
                        <image src="{{helper.image(userInfo.avatarUrl, 200, 200)}}" class="user-avatar"></image>
                        <view class="user-name">{{userInfo.nickName}}</view>

                        <image wx:if="{{userInfo.uid}}" class='vip-icon-image' src='{{vipImg}}'></image>
                    </block>
                </view>
            </view>
            <view class="view-splite clearfix">
            </view>
            <view class="my-order" style='border-bottom:0'>
                <view class="my-order-title" data-type="1" bindtap="toOrdersTap">
                    <view class='title-desc' style='color:#444444'>我的订单</view>
                    <view class="right-desc">
                        <text class="desc">全部订单</text>
                        <text class="iconfont icon-right"></text>
                    </view>
                </view>
                <view class="order-type clearfix" style='border-bottom:0'>
                    <view class="type-item" data-type="2" bindtap="toOrdersTap">
                        <text class="iconfont icon-card"></text>
                        <view class="red-point" hidden="{{!infoNum.wait_pay_num}}">
                            {{infoNum.wait_pay_num>100?'99+':infoNum.wait_pay_num}}
                        </view>
                        待付款
                    </view>
                    <view class="type-item" data-type="3" bindtap="toOrdersTap">
                        <text class="iconfont icon-save"></text>
                        <view class="red-point" hidden="{{!infoNum.wait_cargo_num}}">
                            {{infoNum.wait_cargo_num>100?'99+':infoNum.wait_cargo_num}}
                        </view>
                        待发货
                    </view>
                    <view class="type-item" data-type="4" bindtap="toOrdersTap">
                        <text class="iconfont icon-car"></text>
                        <view class="red-point" hidden="{{!infoNum.send_cargo_num}}">
                            {{infoNum.send_cargo_num>100?'99+':infoNum.send_cargo_num}}
                        </view>
                        待收货
                    </view>
                </view>
            </view>
            <view class="view-splite clearfix"></view>
            <view class='action-item address' bindtap='toAddress'>
                <view class='item-sub-view'>
                    <view class="left-icon-image">
                        <text class="iconfont icon-location"></text>
                    </view>
                    <view class="address-title">地址管理</view>
                </view>
            </view>
            <view class='action-item' catchtap='toService'>
                <view class='item-sub-view'>
                    <view class="left-icon-image">
                        <text class="iconfont icon-service"></text>
                    </view>
                    <view class="address-title">服务与反馈</view>
                </view>
            </view>
        </view>
    </view>
</scroll-view>