百科支持富文本,对公展示充值信息,下载充值记录文件名改动
This commit is contained in:
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user