提交 6fd40826 authored 作者: 曹末's avatar 曹末

pdf查看恢复

上级 aa0b34e9
...@@ -61,27 +61,23 @@ Page({ ...@@ -61,27 +61,23 @@ Page({
type, type,
fileIds fileIds
} = item } = item
wx.navigateTo({ if (type === "pdf") {
url: '/pages/contract-detail/index?item=' + JSON.stringify(item), wx.cloud.downloadFile({
}) fileID: fileIds[0],
// console.log(type) success(res) {
// if (type === "pdf") { if (res.statusCode === 200) {
// wx.cloud.downloadFile({ wx.openDocument({
// fileID: fileIds[0], filePath: res.tempFilePath,
// success(res) { fileType: "pdf"
// if (res.statusCode === 200) { })
// wx.openDocument({ }
// filePath: res.tempFilePath, }
// fileType: "pdf" })
// }) } else {
// } wx.navigateTo({
// } url: '/pages/contract-detail/index?item=' + JSON.stringify(item),
// }) })
// } else { }
// wx.previewImage({
// urls: fileIds // 需要预览的图片http链接列表
// })
// }
}, },
openAction(e) { openAction(e) {
if (this.data.isAdmin) { if (this.data.isAdmin) {
...@@ -123,7 +119,7 @@ Page({ ...@@ -123,7 +119,7 @@ Page({
this.onRefresh() this.onRefresh()
}) })
}) })
.catch(() => {}); .catch(() => { });
} }
} }
...@@ -132,15 +128,15 @@ const action = { ...@@ -132,15 +128,15 @@ const action = {
theme: ActionSheetTheme.List, theme: ActionSheetTheme.List,
selector: '#t-action-sheet', selector: '#t-action-sheet',
items: [{ items: [{
label: '查看合同', label: '查看合同',
}, },
{ {
label: '编辑合同', label: '编辑合同',
color: '#0052D9', color: '#0052D9',
}, },
{ {
label: '删除合同', label: '删除合同',
color: '#e34d59', color: '#e34d59',
}, },
], ],
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论