xy 10 months ago
parent f04310cbce
commit c88846a389

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

Loading…
Cancel
Save