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