|
|
@@ -3,7 +3,8 @@ import { parseRequest } from './request.config'; |
|
|
|
import { firstCharToLowerCase, handleRequest, hint } from './tool'; |
|
|
|
import * as storage from './storage'; |
|
|
|
|
|
|
|
const ip = 'http://139.198.180.242:9003'; |
|
|
|
const ip = 'https://pro.locking.cn:9443'; |
|
|
|
const downloadUrl = 'https://pro.locking.cn:9443/ipfs'; |
|
|
|
|
|
|
|
const header = { 'Content-Type': 'application/json' }; |
|
|
|
|
|
|
@@ -44,6 +45,9 @@ const getData = async (path, params = {}, silent = false) => { |
|
|
|
return outputData; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const downloadFile = async (ipfsCid, options) => Taro.downloadFile({ |
|
|
|
url: `${downloadUrl}/${ipfsCid}`, |
|
|
|
...options, |
|
|
|
}) |
|
|
|
|
|
|
|
export default getData; |