官网地址:
https://docs.microsoft.com/zh-cn/archive/blogs/office_chs/office-web-viewer-office
https://blog.csdn.net/weixin_34460480/article/details/113490227
`文件路径访问是通过域名的 url 来预览,不可以通过 IP 的 url 来访问`
let url = encodeURIComponent('http://delivertest.gisquest.com/kaseurl/a1a4fbada99.docx');
let officeUrl = 'http://view.officeapps.live.com/op/view.aspx?src=' + url;
// 在新窗口打开编码后 的链接
window.open(officeUrl,' _target');
网友评论