收藏
回答

微信小游戏部分安卓机型的授权按钮createUserInfoButton不显示

问题模块 框架类型 问题类型 操作系统 操作系统版本 手机型号 微信版本
客户端 小游戏 Bug Android 安卓9 小米8 7.0.3

微信的登录授权按钮createUserInfoButton()在部分安卓机型不显示,并且在微信版本更新到最新版之后仍无法显示,IOS目前并没有出现这个问题,开发者工具预览也没出现。望官方解决一下~

//微信的登录授权接口  /*
        wx.login({
            success: (res) =>  {
                if (res.code) {
                    var code = res.code;
                    this.visible = true;
                    console.log("登录成功");
                }
                var button = wx.createUserInfoButton(
                    {
                        type: 'text',
                        text: '开始游戏',
                        style:
                            {
                                left: wx.getSystemInfoSync().windowWidth / 2 - 70,
                                top: wx.getSystemInfoSync().windowHeight / 2 + 90,
                                width: 140,
                                height: 40,
                                lineHeight: 40,
                                backgroundColor: '#5151A2',
                                color: '#E6E6F2',
                                textAlign: 'center',
                                fontSize: 18,
                                borderRadius: 4
                            }
                    })
                button.onTap((res) => {
                    if(this.soundRun==true){
                        laya.media.SoundManager.playSound("res/sound/di.mp3",1);
                    }
                    if (res.errMsg == "getUserInfo:ok") {
                            //获取到用户信息
                            this.startClick();
                            button.destroy();
                    }
                    else {
                        console.log("授权失败")
                    }
                })
            }
        })


最后一次编辑于  11-01  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

1 个回答

问题标签