赞
踩
function loadfile(data){ let url = data.file_url let fileName =data.title; wx.showLoading({ title: '正在打开文件' }) const manage = wx.getFileSystemManager(); wx.downloadFile({ url: url, success (res) { var savePath = wx.env.USER_DATA_PATH + "/" + fileName if (res.statusCode == 200) { manage.saveFile({ tempFilePath: res.tempFilePath, filePath: savePath+'.docx', success:function(res){ wx.openDocument({ filePath: res.savedFilePath, success: function (res) { wx.hideLoading() } }) } }) } } }) }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。