@@ -233,16 +233,8 @@
methods: {
// 下载文件
download(param) {
- const regex = /=(.*?)&/g;
- const result = [];
- let match;
- while ((match = regex.exec(param.url))) {
- result.push(match[1]);
- }
- let item = {
- uploadPath: result[0],
- name: param.name
+
uni.downloadFile({
url:param.url,//调接口返回url
success:(res)=>{
@@ -266,7 +258,7 @@
reject(err);
}
})
- fileService.download(item).then()
},
saveFile(url,name){//保存到本地
try{