feat 添加发票域名

develop
GJW200011 4 years ago
parent f673a68e49
commit 1f3b0ef915

@ -19,24 +19,32 @@ Page({
}, },
get_download(e) { get_download(e) {
// console.log(e); // console.log(e);
let url =e.currentTarget.dataset.url wx.showLoading({
title: '正在加载',
mask: true,
})
let url = e.currentTarget.dataset.url
wx.downloadFile({ wx.downloadFile({
url, url,
header: { header: {
'content-type': 'application/json', 'content-type': 'application/json',
}, },
success: function (res) { success: function (res) {
let filePath = res.tempFilePath let filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
fileType:"pdf", fileType: "pdf",
showMenu:true, showMenu: true,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
} }
}) })
} },
}) })
setTimeout(() => {
wx.hideLoading()
}, 1000);
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成

Loading…
Cancel
Save