PC端小程序使用wx.openDocument打开文件提示成功但实际上不会打开问题?

发布于 5 年前作者 hcheng15193 次浏览最后编辑 5 年前来自 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 回复
tangjing
tangjing1 楼5 年前

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

weiwan
weiwan2 楼8 个月前

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