一定得用户点击授权吗?而且授权的那个窗口是不是一定得用户点击某个button后才能弹出,能不能在进入小程序的时候自动弹出啊
现在微信小程序该怎么获取头像?How to get avatar in WeChat applet now?
现在微信小程序该怎么获取头像?一定得用户点击授权吗?而且授权的那个窗口是不是一定得用户点击某个button后才能弹出,能不能在进入小程序的时候自动弹出啊
Do users have to click authorization? And does the authorized window have to pop up after the user clicks a button? Can it pop up automatically when entering the applet
回答:
官方为了保护用户利益,必须用户主动同意授权才可以。
<view bindtap="handleClick">点我</view>handleClick() { wx.getUserProfile() { desc: 'xxx' }}
是的,不能自动弹出,必须用户主动触发。
原文出处:现在微信小程序该怎么获取头像?
不能 前段时间改了 必须用户主动授权