start () {
this.createButton();
},
createButton: function(){
var button = 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
}
})
console.log(“button::::::::::”+button);
button.onTap((res) => {
console.log(res)
})
},
完全按照例子写的获取用户信息按钮,log里面已经生成button,为何界面没有任何显示,多次尝试都不成功;请大神指路