1234567891011121314151617181920212223242526272829303132333435363738 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
- <title>文件预览</title>
- <script src="https://office.jinjianghc.com/web-apps/apps/api/documents/api.js"></script>
- </head>
- <body id="preview">
- </body>
- <script>
- let title = '{$title}',url = '{$url}';
- const index = title.lastIndexOf('.');
- const fileType = title.substr(index + 1);
- const config = {
- "document": {
- "permissions": {
- comment: false,
- fillForms: false,
- "edit": false,
- },
- "fileType": fileType,
- "title": title,
- "url": url,
- // "key": this.md5,
- "lang": "zh-CN"
- },
- "width": '100%',
- "editorConfig": {
- mode: 'view',
- "lang": "zh-CN"
- }
- };
- document.title = title;
- const docEditor = new window.DocsAPI.DocEditor("preview", config);
- </script>
- </html>
|