当前位置:网站首页>Wechat applet - wechat applet browsing PDF files
Wechat applet - wechat applet browsing PDF files
2022-07-28 08:37:00 【In Heaven】
Wechat applet ---- Wechat applet browsing pdf file
explain : adopt wx.downloadFile,wx.openDocumen To open pdf file . Just in js Just operate .
HTTP.Config.Request('source/reportinfo', 'POST', {
reportId: id })
.then(function (i) {
let datas = i.data;
/************************/
wx.downloadFile({
url: datas, // To preview PDF The address of
success: function (res) {
if (res.statusCode === 200) {
// success
var Path = res.tempFilePath // The temporary address of the returned file , Used to open the local preview later
wx.openDocument({
filePath: Path, // The file path to open
success: function (res) {
console.log(' open PDF success ');
}
})
}
},
fail: function (res) {
console.log(res);
}
})
边栏推荐
- sparksql 与flinksql 建表 与 连表记录
- Window 2 - > toolbar (28-1)
- Can‘t connect to server on ‘IP‘ (60)
- 单片机IO口控制12V电压通断,MOS和三极管电路
- 博客搭建七:hugo
- [pyqt] pyqt development experience_ How to find events and methods of controls
- 网络安全漏洞分析与漏洞复现
- Leetcode/ sum of two numbers in a sorted array
- [book club issue 13] Chapter 1 multimedia processing tools ffmpeg tools
- Analysis of model predictive control (MPC) (IX): numerical solution of quadratic programming (II)
猜你喜欢

Leetcode brushes questions. I recommend this video of the sister Xueba at station B

客户至上 | 国产BI领跑者,思迈特软件完成C轮融资

MySQL how to add users and set permissions?

2022牛客多校第二场解题报告

解决EMC、EMI传导干扰的八大方法

业务数字化飞速奔跑,管理数字化亟待出发

GBase 8a MPP与银河麒麟(x86版)完成深度适配

GBASE亮相联通云巡展(四川站) 以专业赋能云生态

Prescan quick start to master the transportation elements in lesson 14, prescan

Recommend a fully open source, feature rich, beautiful interface mall system
随机推荐
Usage of qcombobox
[pyqt] pyqt development experience_ How to find events and methods of controls
Simple use of unity queue
Can‘t connect to server on ‘IP‘ (60)
Get the clicked line number in qtablewidget
What happens when you unplug the power? Gaussdb (for redis) dual life keeps you prepared
Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始
博客搭建九:hugo添加搜索功能
Kubernetes技术与架构(七)
[chart component kit] Shanghai daoning provides developers with steema download, trial and tutorial
ASP. Net core foundation VIII
The fourth phase (2021-2022) research on the implementation of cloud native technology in traditional industries - central state-owned enterprises was officially released
Blog building 7: Hugo
五张图看懂EMI电磁干扰的传播过程-方波陡峭程度对高频成分的影响,时序到频域频谱图形,波形形状对EMI辐射的影响。
No super high-rise buildings | new regulations: what information does it reveal that no new buildings above 500 meters should be built?
bash-shell 免交互
CarSim simulation quick start (10) - Modeling of braking system
Recommend a fully open source, feature rich, beautiful interface mall system
GBase 8s是否支持存储关系型数据和对象型数据?
Js继承方法