mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 12:42:51 +00:00
perf: 优化pdf文件预览
This commit is contained in:
parent
277115a30f
commit
50a1a3147e
@ -70,7 +70,7 @@ class FileContent extends AbstractModel
|
|||||||
'name' => $name,
|
'name' => $name,
|
||||||
'ext' => $fileExt
|
'ext' => $fileExt
|
||||||
]));
|
]));
|
||||||
return Base::fillUrl("online/preview/{$name}?key={$key}");
|
return Base::fillUrl("online/preview/{$name}?key={$key}&version=" . Base::getVersion() . "&__=" . Base::msecTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
10
resources/assets/js/functions/web.js
vendored
10
resources/assets/js/functions/web.js
vendored
@ -66,6 +66,16 @@ import {MarkdownPreview} from "../store/markdown";
|
|||||||
return str
|
return str
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预览文件地址
|
||||||
|
* @param name
|
||||||
|
* @param key
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
onlinePreviewUrl(name, key) {
|
||||||
|
return $A.apiUrl(`../online/preview/${name}?key=${key}&version=${window.systemInfo.version}&__=${new Date().getTime()}`)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目配置模板
|
* 项目配置模板
|
||||||
* @param project_id
|
* @param project_id
|
||||||
|
|||||||
@ -295,7 +295,7 @@ export default {
|
|||||||
previewUrl() {
|
previewUrl() {
|
||||||
if (this.isPreview) {
|
if (this.isPreview) {
|
||||||
const {name, key} = this.contentDetail;
|
const {name, key} = this.contentDetail;
|
||||||
return $A.apiUrl(`../online/preview/${name}?key=${key}&version=${window.systemInfo.version}`)
|
return $A.onlinePreviewUrl(name, key)
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export default {
|
|||||||
previewUrl() {
|
previewUrl() {
|
||||||
if (this.isPreview) {
|
if (this.isPreview) {
|
||||||
const {name, key} = this.contentDetail;
|
const {name, key} = this.contentDetail;
|
||||||
return $A.apiUrl(`../online/preview/${name}?key=${key}&version=${window.systemInfo.version}`)
|
return $A.onlinePreviewUrl(name, key)
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export default {
|
|||||||
|
|
||||||
previewUrl() {
|
previewUrl() {
|
||||||
const {name, key} = this.msgDetail.content;
|
const {name, key} = this.msgDetail.content;
|
||||||
return $A.apiUrl(`../online/preview/${name}?key=${key}&version=${window.systemInfo.version}`)
|
return $A.onlinePreviewUrl(name, key)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
|
|
||||||
previewUrl() {
|
previewUrl() {
|
||||||
const {name, key} = this.fileDetail.content;
|
const {name, key} = this.fileDetail.content;
|
||||||
return $A.apiUrl(`../online/preview/${name}?key=${key}&version=${window.systemInfo.version}`)
|
return $A.onlinePreviewUrl(name, key)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user