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
@@ -255,7 +255,7 @@ Component({
},
goReport(event){
const url=event.currentTarget.dataset.url;
const randfile = new Date().getTime() + '检测报告';
const randfile = new Date().getTime() + '检测报告';
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
wx.downloadFile({
// 示例 url,并非真实存在
@@ -264,12 +264,27 @@ Component({
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"
})
}
})
},
goSick(event){