uu
This commit is contained in:
parent
33584ce731
commit
af1a22e4ee
@ -1,4 +1,5 @@
|
||||
import qs from "@/common/libs/qs"
|
||||
import { saveAs } from "file-saver"
|
||||
|
||||
const tabBarUrls = [
|
||||
'/pages/tabBar/deal/deal',
|
||||
@ -113,7 +114,10 @@ const saveNetFile = (url) => {
|
||||
try{
|
||||
let { tempFilePath } = await downloadFile(url)
|
||||
console.log("save:orgin:tempFilePath", tempFilePath)
|
||||
let res = await saveFile({ tempFilePath })
|
||||
// #ifdef H5
|
||||
saveAs(tempFilePath)
|
||||
// #endif
|
||||
// let res = await saveFile({ tempFilePath })
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
plus.io.convertLocalFileSystemURL(tempFilePath);
|
||||
@ -122,7 +126,7 @@ const saveNetFile = (url) => {
|
||||
|
||||
hideLoading()
|
||||
showToast('保存成功')
|
||||
resolve(res)
|
||||
resolve(tempFilePath)
|
||||
}catch(e){
|
||||
hideLoading()
|
||||
showToast('保存失败')
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.10"
|
||||
"dayjs": "^1.11.10",
|
||||
"file-saver": "2.0.5"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user