小游戏在锤子手机上测试调用creatUserInfoButttonb不显示按钮
- 当前 Bug 的表现(可附上截图) window['wx'].login({ success: res => { console.log("begin11"); // ------ 获取凭证 ------ if (res.code) { this.codes = res.code; console.log("登陆成功,获取到code") } var register: mod_login.mod_login_c2s_login = new mod_login.mod_login_c2s_login(); register.jsCode = this.codes; this.buttons = window['wx'].createUserInfoButton({ type: 'text', text: "开始游戏", style: { left: 100, top: 76, width: 200, height: 40, lineHeight: 40, backgroundColor: '#ff0000', color: '#ffffff', textAlign: 'center', fontSize: 16, borderRadius: 4 } }) this.buttons.onTap((res)=> { if(res.userInfo){ this.logins(); console.log(res); register.encryptedData = res.encryptedData; register.iv = res.iv; register.key3rdSession = ""; let sendByte: Uint8Array = mod_login.mod_login_c2s_login.encode(register).finish(); SocketManager.instance().send(ClientToServer.Login, sendByte); console.log(register) this.logins(); console.log(this+"this"); this.buttons.destroy(); } }) this.buttons['show'](); } }) } [图片] 然后锤子手机不出现授权按钮,但小米手机可以出现授权按钮