This commit is contained in:
fengchenchen
2023-08-14 17:10:11 +08:00
commit 37f6ec895d
1145 changed files with 437754 additions and 0 deletions
+14
View File
@@ -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
}