officePreviewUrl

This commit is contained in:
devezhao 2021-10-27 12:27:04 +08:00
parent 224dabed71
commit 58e653635d

View file

@ -182,8 +182,7 @@ class RbPreview extends React.Component {
const fileName = $fileCutName(currentUrl)
if (this._isDoc(fileName)) {
const setPreviewUrl = function (url) {
// const previewUrl = rb.commercial < 10 ? `https://view.officeapps.live.com/op/embed.aspx?src=${$encode(url)}` : `${rb.baseUrl}/filex/access/pdf-preview?src=${$encode(url)}`
const previewUrl = `https://view.officeapps.live.com/op/embed.aspx?src=${$encode(url)}`
const previewUrl = (window.officePreviewUrl || 'https://view.officeapps.live.com/op/embed.aspx?src=') + $encode(url)
that.setState({ previewUrl: previewUrl, errorMsg: null })
}