yujialong 2 months ago
parent cccec80f2a
commit 8036814252
  1. 53
      course/courseDetail/courseDetail.vue
  2. 2
      pages/index/index.vue

@ -9,6 +9,7 @@
<!-- pdfwordexcelppt都用webview展示 -->
<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="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-image class="icon" src="https://eduvessel.com/images/occupationlab/close-gray.png" alt="" mode="widthFix" />
</cover-view>
@ -362,31 +363,33 @@
// pptwebviewoffice
if ((type === 'pptx' || type === 'ppt') && platform === 'android') {
this.curRow = {}
uni.showLoading({
title: '加载中',
mask: true
})
uni.downloadFile({
url: row.fileUrl,
success: function(res) {
console.log(11, res)
// doc, xls, ppt, pdf, docx, xlsx, pptx
uni.openDocument({
filePath: res.tempFilePath,
fileType: row.fileType,
showMenu: true, //
success: res => {
uni.hideLoading()
},
fail: openError => {
uni.hideLoading()
}
})
},
fail: function(err) {
uni.hideLoading()
}
})
row.viewUrl = 'https://eduvessel.com/#/previewPPT?src=' + row.fileUrl
row.isAndroidPreviewPPT = true
// uni.showLoading({
// title: '',
// mask: true
// })
// uni.downloadFile({
// url: row.fileUrl,
// success: function(res) {
// console.log(11, res)
// // doc, xls, ppt, pdf, docx, xlsx, pptx
// uni.openDocument({
// filePath: res.tempFilePath,
// fileType: row.fileType,
// showMenu: true, //
// success: res => {
// uni.hideLoading()
// },
// fail: openError => {
// uni.hideLoading()
// }
// })
// },
// fail: function(err) {
// uni.hideLoading()
// }
// })
} else {
if (this.$util.exts.video.includes(type)) {
row.isVideo = true

@ -56,7 +56,7 @@
}, 1500)
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjQ2NzQ1LCJyblN0ciI6IjMwRWUxeGdZdWNVRldRbnVvQ2g4VW91UHVEM2FCT3ZIIiwiYWNjb3VudElkIjo0Njc0NSwidXNlcklkIjo0Njc0NCwic2Nob29sSWQiOjI4NDYsInBsYXRmb3JtSWQiOiIxIn0.cYd_MaosBesD8iwoPV6XB91bit2vtmzpOVThQtPVxxs')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjQ2NzQ0LCJyblN0ciI6IktVcVR5eWtSbGlVQzF0dmRjdDRuR3dWaGVBaTJwQ2lMIiwiYWNjb3VudElkIjo0Njc0NCwidXNlcklkIjo0Njc0Mywic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.zo6L0AYyZA5yfMFovV9oGQHuFJgs936fa4bzyvpiK4Y')
this.$refs.realName.handleRealName()
this.getTab()
},

Loading…
Cancel
Save