diff --git a/pages/mine/pages/myReport/index.js b/pages/mine/pages/myReport/index.js index b819bdd..bc63b93 100644 --- a/pages/mine/pages/myReport/index.js +++ b/pages/mine/pages/myReport/index.js @@ -88,7 +88,7 @@ Page({ wx.showToast({ title: '加载中...', icon: 'loading', - duration: 300000 + duration: 5000 }) if (row.Status !== 2) { wx.showModal({ @@ -99,8 +99,10 @@ Page({ } let file = decodeURIComponent(row.FilePath); file = this.getFilePathName(file); + let uri = row.FilePath.replace(/\\/g,'/'); + console.log(uri) wx.downloadFile({ - url: row.FilePath, + url: uri, filePath: wx.env.USER_DATA_PATH + '/' + file, success: function (res) { let filePath = res.filePath //返回的文件临时地址,用于后面打开本地预览所用 @@ -120,7 +122,6 @@ Page({ } }, fail: function (res) { - wx.hideToast(); console.log(res) } })