<view class='box'>
  <block wx:if="{{!hasUserInfo&&isLoading}}">
    <view class='header'>
      <view class="userinfo-avatar">
      <open-data  type="userAvatarUrl"></open-data>
      </view>
    </view>
    <view class='content'>
       <view>申请获取以下权限</view>
       <text>获得您的公开信息(昵称，头像等)</text>
    </view>
    <button class='bottom' type='primary' wx:if="{{canIUse}}"open-type="getUserInfo"
        bindgetuserinfo="getUserInfo">同意授权</button>
    <text wx:else>请升级微信版本，使用1.3.0或以上的基础库</text>
  </block>  
  <view wx:else >
  <view class='header'>
    <view class="userinfo-avatar">
      <open-data  type="userAvatarUrl"></open-data>
    </view>
  </view >
  <view class='head'>
    <view  class='center' type='primary' bindtap="bindViewTap">确认登录</view>
    <view  class='right' type='primary' bindtap="bindViewTap1">取消登录</view>
    </view>

  </view>
</view>

 