UserInfoButton
隐藏 api 不生效
var infoButton = wx.createUserInfoButton({ type: 'text' , text: '获取用户信息' , style: { left: 10, top: 76, width: 200, height: 40, lineHeight: 40, backgroundColor: '#ff0000' , color: '#ffffff' , textAlign: 'center' , fontSize: 16, borderRadius: 4 } }); infoButton.onTap((res) => { console.log(res); // button.hide(); // button.destroy(); }); setTimeout(()=>{ infoButton.hide(); // infoButton.destroy(); },10000); |