背景:wx.getUserProfile接口gg了。淦!
以前直接获取头像昵称;后来强制弹窗,用户授权后获取头像昵称;现在需要用户自己填写头像昵称。。。。还得我们自己写一个页面。。。。
方法:
头像:
<button class="avatar-wrapper" open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
<image class="avatar" src="{{avatarUrl}}"></image>
</button>
昵称:
<form catchsubmit="formSubmit">
<view class="row">
<view class="text1">昵称:</view>
<input type="nickname" class="weui-input" name="nickname" placeholder="请输入昵称"/>
</view>
<button type="primary" style="margin-top: 40rpx;margin-bottom: 20rpx;" form-type="submit">提交</button>
</form>
(谁知道wx.getUserProfile这个接口还有什么luan用吗???)