微信 6.7.2 审核提示这两个机型有问题,论坛上找了一圈,群里也问了一圈,有很多人遇到这个问题,目前定位到出个这个是官方的两个 api: 登录 wx.createUserInfoButton 或 createGameClubButton 之一引起的,看到论坛有人说 api 有变更,但是我检查我这边的代码没有定位到错误,请教下各位。
// createUserInfoButton
const self = this
if(typeof wx != 'undefined') {
const w = wx.getSystemInfoSync().screenWidth
const h = wx.getSystemInfoSync().screenHeight
const button = wx.createUserInfoButton({
type: 'text',
text: '微信登录',
style: {
left: w / 2 - 100,
top: h / 2 * 1.4,
width: 200,
height: 40,
lineHeight: 40,
backgroundColor: "#1aad19",
color: "#ffffff",
textAlign: "center",
fontSize: 16,
borderRadius: 4
}
})
button.onTap((res) => {
if(res.errMsg === 'getUserInfo:ok') {
console.log(res)
cc.sys.localStorage.setItem('userInfo', res.userInfo)
// cc.director.loadScene('menu')
self.loadMenu()
button.destroy()
}
})
console.log(button)
}
// createGameClubButton
const w = wx.getSystemInfoSync().screenWidth
const h = wx.getSystemInfoSync().screenHeight
G.clubBtn = wx.createGameClubButton({
type: 'text',
text: '',
style: {
left: w - 90,
top: h - 40,
width: 90,
height: 40
}
})
我在云真机上测试没有发现问题,各位有遇到吗?
