
<!--pages/mine/mine.wxml-->
<view class="header">
  <view>
    <image class="avatar" src="{{loginInfo ? userInfo.avatarUrl: '/images/default-image.png'}}"></image>
  </view>
  <view>
    {{loginInfo ? userInfo.nickName : '未登录'}}
  </view>
  <view wx:if="{{loginInfo}}" class="classname">
    {{loginInfo.phone}}
  </view>
</view>
<view wx:if="{{loginInfo}}" class="weui-cells">
  <navigator  url="/pages/address/list" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
    <view class="weui-cell__bd">收货地址</view>
    <view class="weui-cell__ft weui-cell__ft_in-access"></view>
  </navigator>
  <navigator url="/pages/mine/coupon" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
    <view class="weui-cell__bd">我的红包</view>
    <view class="weui-cell__ft weui-cell__ft_in-access"></view>
  </navigator>
</view>
<view class="weui-cells">
  <view data-phone="400-926-2108" bindtap="onPhoneTap" class="weui-cell weui-cell_access">
    <view class="weui-cell__bd">客服热线</view>
    <view class="weui-cell__ft weui-cell__ft_in-access">400-926-2108</view>
  </view>
</view>

<view class="button-sp-area">
  <button loading="{{loading}}" bindtap="onLogout" wx:if="{{loginInfo}}"  class="weui-btn weui-btn_plain" >
    退出账号
  </button>
  <navigator url="/pages/login/login?callback=callback" wx:else class="weui-btn weui-btn_primary" hover-class="button-hover">
    立即登录
  </navigator>
</view>