| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <view class="container">
- <view class="userinfo">
- <block wx:if="{{canIUseOpenData}}">
- <view class="userinfo-avatar">
- <open-data type="userAvatarUrl"></open-data>
- </view>
- <open-data type="userNickName"></open-data>
- </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>
- <van-cell-group>
- <van-field
- model:value="{{ username }}"
- required
- clearable
- label="用户名"
- icon="question-o"
- placeholder="请输入用户名"
- bind:click-icon="onClickIcon"
- />
- <van-field
- model:value="{{ password }}"
- type="password"
- label="密码"
- placeholder="请输入密码"
- required
- border="{{ false }}"
- />
- </van-cell-group>
- <!-- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" style="width: 500rpx;line-height: 100rpx;height: 100rpx;background-color: rgb(21, 156, 55); color: antiquewhite;margin-bottom:30rpx">获取手机号</button> -->
- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">查看手机</button>
- <button bindtap="getinfo" style="width: 300rpx;line-height: 80rpx;height: 80rpx;margin-top: 30rpx;">登录</button>
- <van-notify id="van-notify" />
|