|
|
@ -21,7 +21,7 @@ export async function uploadOssByPath(filePath: string) { |
|
|
|
let stsExpired = Taro.getStorageSync('stsExpiredAt'); |
|
|
|
if (!sts || (stsExpired && dayjs().isBefore(dayjs(stsExpired)))) { |
|
|
|
// @ts-ignore
|
|
|
|
const {data: {data: {credentials}}} = await request.get(`https://server.gxwebsoft.com/api/oss/getSTSToken`) |
|
|
|
const {data: {data: {credentials}}} = await request.get(`https://server.websoft.top/api/oss/getSTSToken`) |
|
|
|
Taro.setStorageSync('sts', credentials) |
|
|
|
Taro.setStorageSync('stsExpiredAt', credentials.expiration) |
|
|
|
sts = credentials |
|
|
@ -66,7 +66,7 @@ export async function uploadFile() { |
|
|
|
const tempFilePath = res.tempFilePaths[0]; |
|
|
|
// 上传图片到OSS
|
|
|
|
Taro.uploadFile({ |
|
|
|
url: 'https://server.gxwebsoft.com/api/oss/upload', |
|
|
|
url: 'https://server.websoft.top/api/oss/upload', |
|
|
|
filePath: tempFilePath, |
|
|
|
name: 'file', |
|
|
|
header: { |
|
|
|