8.28修改文字

This commit is contained in:
zoujiandong
2023-08-28 14:26:56 +08:00
parent 469bdd058a
commit c52bb75828
5 changed files with 53 additions and 20 deletions
+30 -15
View File
@@ -22,21 +22,36 @@ Page({
goReport(event){
const url=event.currentTarget.dataset.url;
const randfile = new Date().getTime() + '检测报告';
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
wx.downloadFile({
// 示例 url,并非真实存在
url:url,
filePath: newPath,
success: function (res) {
//const filePath = res.tempFilePath
wx.openDocument({
filePath: newPath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
wx.downloadFile({
// 示例 url,并非真实存在
url:url,
filePath: newPath,
success: function (res) {
//const filePath = res.tempFilePath
wx.openDocument({
fileType:"pdf",
showMenu:true,
filePath: newPath,
success: function (res) {
console.log('打开文档成功')
},
fail:function(error){
wx.showToast({
title:res,
icon:"none"
})
}
})
},
fail:function(error){
wx.showToast({
title:error,
icon:"none"
})
}
})
},
formatImgList(){
let diagnose_images = this.data.case_detail.diagnose_images?this.data.case_detail.diagnose_images:[];