收藏
回答

微信开发开发者工具用文档示例代码调用showShareImageMenu报错?在真机上没问题

https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareImageMenu.html#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81

wx.downloadFile({
    url: 'https://res.wx.qq.com/wxdoc/dist/assets/img/demo.ef5c5bef.jpg',
    success: (res) => {
        console.log(res.tempFilePath);
        wx.showShareImageMenu({
            path: res.tempFilePath,
            success: (res) => {
                console.log('success', res)
            }, fail: (res) => {
                console.log('fail', res)
            }


        })
    }
})


最后一次编辑于  2023-05-26
回答关注问题邀请回答
收藏
登录 后发表内容