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展示 --> <!-- pdfwordexcelppt都用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 @@
// pptwebviewoffice // pptwebviewoffice
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

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

Loading…
Cancel
Save