Commit 6339196c by zhangzhen

细节优化

parent a4f503e0
......@@ -162,7 +162,7 @@
},
islmage(filename) {
const extension = filename.split('.').pop().toLowerCase();
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg','mp4','3gp','avi','docx','pdf']
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg','mp4','3gp','avi','docx','pdf','txt','xlsx','xls']
return imageExtensions.includes(extension);
},
onNavToPreview() {
......@@ -170,11 +170,10 @@
if (res.data.__sys__.status === 1) {
if(this.islmage(this.orderInfo.docName)){
this.previewStatus = true;
if(['docx','pdf'].includes(this.orderInfo.fileSuffix) ){
if(['docx','pdf','txt','xlsx','xls'].includes(this.orderInfo.fileSuffix)){
let urlStr=`${this.hostUrl}/?docId=${this.orderInfo.docId}&fileSuffix=${this.orderInfo.fileSuffix}`
window.open(urlStr)
}
}else{
let urlStr = this.assetsPath + '/hggp/file/download/' + this.orderInfo.docId;
uni.downloadFile({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment