uu
This commit is contained in:
parent
af1a22e4ee
commit
fcf4ee6761
@ -1,5 +1,8 @@
|
||||
import qs from "@/common/libs/qs"
|
||||
// #ifdef H5
|
||||
import { saveAs } from "file-saver"
|
||||
// #endif
|
||||
|
||||
|
||||
const tabBarUrls = [
|
||||
'/pages/tabBar/deal/deal',
|
||||
@ -112,16 +115,17 @@ const saveNetFile = (url) => {
|
||||
return new Promise(async (resolve, reject)=> {
|
||||
showLoading('正在保存文件')
|
||||
try{
|
||||
let { tempFilePath } = await downloadFile(url)
|
||||
console.log("save:orgin:tempFilePath", tempFilePath)
|
||||
let dRes = await getImageInfo(url)
|
||||
console.log("save:downloadFile:getImageInfo", dRes)
|
||||
let { tempFilePath, path } = dRes
|
||||
// #ifdef H5
|
||||
saveAs(tempFilePath)
|
||||
saveAs(path)
|
||||
// #endif
|
||||
// let res = await saveFile({ tempFilePath })
|
||||
// let res = await saveFile({ path })
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
plus.io.convertLocalFileSystemURL(tempFilePath);
|
||||
plus.runtime.openFile(tempFilePath); //选择软件打开文件
|
||||
plus.io.convertLocalFileSystemURL(path);
|
||||
plus.runtime.openFile(path); //选择软件打开文件
|
||||
// #endif
|
||||
|
||||
hideLoading()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user