diff --git a/bundle/pages/resource_details/resource_details.vue b/bundle/pages/resource_details/resource_details.vue index 31b9917..accdd22 100644 --- a/bundle/pages/resource_details/resource_details.vue +++ b/bundle/pages/resource_details/resource_details.vue @@ -210,14 +210,29 @@ team_min_price url: this.resourceDetail.path, //仅为示例,并非真实的资源 success: (res) => { if (res.statusCode === 200) { + let files = res.tempFilePath; uni.saveFile({ - tempFilePath: res.tempFilePath, + tempFilePath: files, success: function (res2) { that.downloadLog(that.resourceDetail.id); var savedFilePath = res2.savedFilePath; - let msg = "文件存储到"+savedFilePath; - uni.showLoading({ - title: msg + // let msg = "文件存储到"+savedFilePath; + // uni.showLoading({ + // title: msg + // }); + uni.openDocument({ + filePath: savedFilePath, + showMenu: true, + success: function(res3) { + console.log(1111) + uni.hideLoading() + }, + fail: function(res3) { + console.log(res3) + uni.showLoading({ + title: "打开文件失败" + }); + } }); setTimeout(function () { uni.hideLoading()