
微信小程序批量上传图片 All In One
open-data
https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
<!-- 当 type="groupName" 时生效, 群id -->
<open-data type="groupName" open-gid="xxxxxx"></open-data>
<open-data type="userAvatarUrl"></open-data>
<open-data type="userGender" lang="zh_CN"></open-data>
open-type
https://developers.weixin.qq.com/miniprogram/dev/component/button.html
getUserInfo 获取用户信息,可以从bindgetuserinfo回调中获取到用户信息
<button
open-type="getUserInfo"
bind:tap="bindgetuserinfo"
type="primary"
size="mini">获取到用户信息</button>
https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserInfo.html
<!-- 如果只是展示用户头像昵称,可以使用 <open-data /> 组件 -->
<open-data type="userAvatarUrl"></open-data>
<open-data type="userNickName"></open-data>
<!-- 需要使用 button 来授权登录 -->
<button wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>
<view wx:else>请升级微信版本</view>
refs

xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!