PC端小程序使用wx.openDocument打开文件提示成功但实际上不会打开问题?
发布于 3 年前 作者 hcheng 14824 次浏览 来自 官方Issues

appid:wx4e4ed37286c816c2

代码:

wx.downloadFile({

            url: ‘https://miniprogram.mail.10086.cn/viewtest/static/test.pdf’,

            success: function (res) {

                const filePath = res.tempFilePath;

                wx.openDocument({

                    filePath: filePath,

                    fileType: ‘pdf’,

                    success: function (res) {

                        wxlog.info(‘res999’, ‘打开文档成功’);

                    },

                    fail: function (err) {

                        wxlog.info(‘err111’, err);

                    },

                });

            },

        });

2 回复

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

是在微信电脑端3.X有这类问题,微信电脑端2.x版本可以正常拉起预览器,问题表现在小程序的体验版本

回到顶部