Commit f076ff28 by zhangzhen

细节优化

parent 654eb208
...@@ -176,41 +176,12 @@ ...@@ -176,41 +176,12 @@
onNavToPreview() { onNavToPreview() {
addPreview(this.orderInfo).then(res => { addPreview(this.orderInfo).then(res => {
if (res.data.__sys__.status === 1) { if (res.data.__sys__.status === 1) {
let urlStr = `${this.assetsPath}/hggp/file/download/preview/${this.orderInfo.docId}?fullfilename=${this.orderInfo.docName}`; if(res.data.url){
let fullUrl = `${this.hostUrl}/preview/onlinePreview?url=${encodeURIComponent(Base64.encode(res.data.url))}`;
console.log(Base64.encode(urlStr))
let fullUrl = `${this.hostUrl}/preview/onlinePreview?url=${encodeURIComponent(Base64.encode(urlStr))}`;
console.log(urlStr)
console.log(fullUrl)
window.open(fullUrl) window.open(fullUrl)
// if(this.islmage(this.orderInfo.docName)){
// this.previewStatus = true;
// if(['docx','pdf','txt','xlsx','xls','doc'].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({
// url: urlStr,
// success: (res)=> {
// console.log(res,999999)
// let filePath = res.tempFilePath;
// uni.openDocument({
// filePath: filePath,
// showMenu: true,
// success: (res) =>{
// console.log('打开文档成功');
// }
// });
// }
// });
// }
} }
this.onGetList(); this.onGetList();
}
}) })
}, },
onDownLoad() { onDownLoad() {
......
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