diff --git a/course/courseDetail/courseDetail.vue b/course/courseDetail/courseDetail.vue index fdb1eb7..f300541 100644 --- a/course/courseDetail/courseDetail.vue +++ b/course/courseDetail/courseDetail.vue @@ -9,6 +9,7 @@ + @@ -362,31 +363,33 @@ // ppt安卓下没法用webview或者用微软的office服务预览(皆会没法显示),因此下载到本地查看 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 diff --git a/pages/index/index.vue b/pages/index/index.vue index e73ae7e..20ae518 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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() },