【fix bug】66408 文件上传组件JUpload预览问题
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
|
||||
const getToken = () => Vue.ls.get(ACCESS_TOKEN)
|
||||
|
||||
// 预览pdf
|
||||
const previewPdf = (id) => {
|
||||
const url = `${window._CONFIG.domianURL}/sys/common/download/${id}?type=view&token=${getToken()}`
|
||||
return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf'
|
||||
}
|
||||
|
||||
export {
|
||||
previewPdf
|
||||
}
|
||||
Reference in New Issue
Block a user