|
|
@ -9,6 +9,7 @@ |
|
|
|
<!-- pdf、word、excel、ppt都用webview展示 --> |
|
|
|
<!-- pdf、word、excel、ppt都用webview展示 --> |
|
|
|
<view v-else-if="curRow.isDoc" class="webview-wrap"> |
|
|
|
<view v-else-if="curRow.isDoc" class="webview-wrap"> |
|
|
|
<web-view class="webview" :webview-styles="webviewStyles" :fullscreen="false" :src="curRow.viewUrl" @click="hidePlayList"></web-view> |
|
|
|
<web-view class="webview" :webview-styles="webviewStyles" :fullscreen="false" :src="curRow.viewUrl" @click="hidePlayList"></web-view> |
|
|
|
|
|
|
|
<!-- <web-view class="webview" :webview-styles="webviewStyles" :fullscreen="false" src="http://192.168.31.125:8097/#/previewPPT?src=https%3A%2F%2Fhuoran.oss-cn-shenzhen.aliyuncs.com%2F1725254394528.pptx" @click="hidePlayList"></web-view> --> |
|
|
|
<cover-view class="webview-mask" @click="closePreview"> |
|
|
|
<cover-view class="webview-mask" @click="closePreview"> |
|
|
|
<cover-image class="icon" src="https://eduvessel.com/images/occupationlab/close-gray.png" alt="" mode="widthFix" /> |
|
|
|
<cover-image class="icon" src="https://eduvessel.com/images/occupationlab/close-gray.png" alt="" mode="widthFix" /> |
|
|
|
</cover-view> |
|
|
|
</cover-view> |
|
|
@ -362,31 +363,33 @@ |
|
|
|
// ppt安卓下没法用webview或者用微软的office服务预览(皆会没法显示),因此下载到本地查看 |
|
|
|
// ppt安卓下没法用webview或者用微软的office服务预览(皆会没法显示),因此下载到本地查看 |
|
|
|
if ((type === 'pptx' || type === 'ppt') && platform === 'android') { |
|
|
|
if ((type === 'pptx' || type === 'ppt') && platform === 'android') { |
|
|
|
this.curRow = {} |
|
|
|
this.curRow = {} |
|
|
|
uni.showLoading({ |
|
|
|
row.viewUrl = 'https://eduvessel.com/#/previewPPT?src=' + row.fileUrl |
|
|
|
title: '加载中', |
|
|
|
row.isAndroidPreviewPPT = true |
|
|
|
mask: true |
|
|
|
// uni.showLoading({ |
|
|
|
}) |
|
|
|
// title: '加载中', |
|
|
|
uni.downloadFile({ |
|
|
|
// mask: true |
|
|
|
url: row.fileUrl, |
|
|
|
// }) |
|
|
|
success: function(res) { |
|
|
|
// uni.downloadFile({ |
|
|
|
console.log(11, res) |
|
|
|
// url: row.fileUrl, |
|
|
|
// 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。 |
|
|
|
// success: function(res) { |
|
|
|
uni.openDocument({ |
|
|
|
// console.log(11, res) |
|
|
|
filePath: res.tempFilePath, |
|
|
|
// // 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。 |
|
|
|
fileType: row.fileType, |
|
|
|
// uni.openDocument({ |
|
|
|
showMenu: true, // 允许出现分享功能 |
|
|
|
// filePath: res.tempFilePath, |
|
|
|
success: res => { |
|
|
|
// fileType: row.fileType, |
|
|
|
uni.hideLoading() |
|
|
|
// showMenu: true, // 允许出现分享功能 |
|
|
|
}, |
|
|
|
// success: res => { |
|
|
|
fail: openError => { |
|
|
|
// uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
|
// }, |
|
|
|
} |
|
|
|
// fail: openError => { |
|
|
|
}) |
|
|
|
// uni.hideLoading() |
|
|
|
}, |
|
|
|
// } |
|
|
|
fail: function(err) { |
|
|
|
// }) |
|
|
|
uni.hideLoading() |
|
|
|
// }, |
|
|
|
} |
|
|
|
// fail: function(err) { |
|
|
|
}) |
|
|
|
// uni.hideLoading() |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (this.$util.exts.video.includes(type)) { |
|
|
|
if (this.$util.exts.video.includes(type)) { |
|
|
|
row.isVideo = true |
|
|
|
row.isVideo = true |
|
|
|