Blame view

mini-program-test/pages/index/index.wxml 1.05 KB
8dbd6143   YunaiV   增加微信小程序的登陆的测试代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  <!--index.wxml-->
  <view class="container">
    <view class="userinfo">
      <block wx:if="{{canIUseOpenData}}">
  
  
      </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">
      
    </view>
  
  
  
    <text style="position: relative; left: 1rpx; top: -476rpx">授权登录测试1024</text>
  
    <button style="position: relative; left: 0rpx; top: -361rpx" type="primary" id="login-button" bindtap="wxLogin">点击授权登录</button>
  
    <text style="position: relative; left: 1rpx; top: -272rpx" id="login-user-id">{{holderText}}</text>
  </view>