createUserInfoButton在iOS下无法显示图片Android可以
发布于 6 年前 作者 tianli 9647 次浏览 来自 问答
  • 当前 Bug 的表现

相同的代码

button = wx.createUserInfoButton({
    type: 'image',
    image: '/wxlocal/start.png',
    style: {
        left: (sysInfo.screenWidth - btn_width) / 2,
        top: (sysInfo.screenHeight - btn_height) / 2 + (sysInfo.screenHeight / 4),
        width: btn_width,
        height: btn_height
    }
});

在Android上可以显示授权按钮,iOS上不行,尝试多台手机验证都是如此。

基础库的版本也是不正确的

1 回复

在iOS下不显示 图片,但相应位置点击操作有响应,能弹出微信授权窗口。

图片尝试了png和jpg都无法显示

已经修复

image的路径改为:

button = wx.createUserInfoButton({

    type: 'image',

    image: 'wxlocal/start.png',

    style: {

        left: (sysInfo.screenWidth - btn_width) / 2,

        top: (sysInfo.screenHeight - btn_height) / 2 + (sysInfo.screenHeight / 4),

        width: btn_width,

        height: btn_height

    }

});

就好

回到顶部