<!--index.wxml-->
<view class="container">
  <view class="userinfo">
    <block wx:if="{{canIUseOpenData}}">
      <view class="userinfo-avatar" bindtap="bindViewTap">
        <open-data type="userAvatarUrl"></open-data>
      </view>
      <view><open-data type="userNickName"></open-data></view>
      <view><text>{{currentuserinfo.mobile}}</text></view>
    </block>
    <block wx:elif="{{!hasUserInfo}}">
      <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
      <button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
      <view wx:else> 请使用1.4.4及以上版本基础库 </view>
    </block>
    <block wx:else>
      <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
      <text class="userinfo-nickname">{{userInfo.nickName}}</text>
    </block>
  </view>
  <view class="usermotto">
    <button  open-type="getPhoneNumber"  bindgetphonenumber="getPhoneNumber" >绑定手机</button>
  </view>

  <view class="usermotto">
    <button  type="primary" bindtap="leftright">左右滑动</button>
    <button  type="primary" bindtap="swipperpics">软播图</button>
    <button  type="primary" bindtap="tarbar">TAB标签</button>
    <button  type="primary" bindtap="clickgrid">九宫格</button>
    <button  type="primary" bindtap="clickpics">图片显示</button>
    <button type="primary" bindtap="swipecell">按钮滑动</button>
  </view>

  <view class="usermotto">
    <button  bindtap="getcureentuserinfo" >获取当前用户信息</button>
  </view>

  <view >
   <text>{{currentuserinfo.nickname}}--{{currentuserinfo.mobile}}--{{currentuserinfo.openid}}--{{currentuserinfo.id}}</text>
  </view>
</view>
