Files
wx-h5-demo/miniapp/scenario1-auth-bridge.wxml

17 lines
959 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 场景1:授权桥页(H5 在微信浏览器 → 跳进本页 → 授权 → 回到 H5)
START:经 <wx-open-launch-weapp path="/pages/demo/auth"> 或 小程序 URL Scheme(path=/pages/demo/auth) 进入 -->
<!-- wxml -->
<view class="auth-wrap">
<view class="auth-title">授权获取资料</view>
<view class="auth-sub">授权后自动回到「wx-h5-demo」H5</view>
<button class="auth-btn" open-type="getPhoneNumber" bindgetphonenumber="onPhone">获取手机号</button>
<input class="auth-input" type="nickname" bindblur="onNick" bindchange="onNick" placeholder="输入昵称" />
<button class="auth-btn avatar" open-type="chooseAvatar" bindchooseavatar="onAvatar">
<image wx:if="{{avatar}}" class="auth-avatar" src="{{avatar}}" mode="aspectFill" /><text wx:else>选择头像</text>
</button>
<button class="auth-done" bindtap="finishAuth">完成</button>
<view class="auth-cancel" bindtap="cancel">取消</view>
</view>