wx.createUserInfoButton()接口报错

发布于 6 年前作者 gang5311074 次浏览最后编辑 6 年前来自 ask

var button = wx.createUserInfoButton({

type: ‘text’,

text: ‘获取用户信息’,

style: {

left: 15,

bottom: 15,

width: 120,

height: 40,

lineHeight: 40,

backgroundColor: ‘#ca7f3f’,

color: ‘#fdf9e0’,

textAlign: ‘center’,

fontSize: 16,

borderRadius: 4

}

})

this.button.onTap((res) => {

self.button.hide()

if (res && res.userInfo) {

LoginManager.weChatGameLogin(res.userInfo)

}

})

官方能给个解释吗?这个新的按钮授权流程,接口报错,早上还是好的,刚才突然报错,然后下面的流程进行不下去了

1 回复
xia61
xia611 楼5 年前

确认一下客户端的基础库版本?