百科支持富文本,对公展示充值信息,下载充值记录文件名改动

This commit is contained in:
2024-10-22 16:11:49 +08:00
parent f00bcbe8d1
commit cb58d3b439
6 changed files with 48 additions and 7 deletions

View File

@@ -78,11 +78,11 @@ Page({
return;
}
const fs = wx.getFileSystemManager()
const newPath = wx.env.USER_DATA_PATH + '/' + `收据-${detail.time}.pdf`
const newPath = `${wx.env.USER_DATA_PATH}/收据-${detail.time.slice(0, 10)}.pdf`
fs.rename({
oldPath: res.tempFilePath,
newPath: newPath,
success() {
success(r) {
wx.openDocument({
filePath: newPath,
fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了
@@ -98,6 +98,8 @@ Page({
},
fail(res) {
console.error(res)
alertInfo("下载失败")
rej()
}
})