|
|
|
@ -66,6 +66,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.type = this.$route.query.type || originalUrl.split('.').at(-1)
|
|
|
|
this.type = this.$route.query.type || originalUrl.split('.').at(-1)
|
|
|
|
// this.url = originalUrl
|
|
|
|
// this.url = originalUrl
|
|
|
|
|
|
|
|
if (['jpeg','jpg','png','gif','webp','svg'].indexOf(this.type) !== -1) {
|
|
|
|
|
|
|
|
this.url = originalUrl
|
|
|
|
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
this.url = process.env.VUE_APP_DOMIAN + (window.location.origin === window.top.location.origin ? '/oa' : '') + new URL(originalUrl).pathname
|
|
|
|
this.url = process.env.VUE_APP_DOMIAN + (window.location.origin === window.top.location.origin ? '/oa' : '') + new URL(originalUrl).pathname
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
@ -73,6 +76,7 @@ export default {
|
|
|
|
this.url = process.env.VUE_APP_DOMIAN + '/oa' + new URL(originalUrl).pathname
|
|
|
|
this.url = process.env.VUE_APP_DOMIAN + '/oa' + new URL(originalUrl).pathname
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
console.log(this.url)
|
|
|
|
console.log(this.url)
|
|
|
|
// if(this.type === 'doc') {
|
|
|
|
// if(this.type === 'doc') {
|
|
|
|
// const res = await fetch(this.url)
|
|
|
|
// const res = await fetch(this.url)
|
|
|
|
|