From e30fb2a041e87fc3ca2336535951cb5d3b80749f Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 2 Apr 2026 17:37:24 +0800 Subject: [PATCH] 1 --- src/utils/oss.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/oss.js b/src/utils/oss.js index dba5248f..723d155e 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -23,9 +23,6 @@ async function ossGenerateSTS() { res = await GetObjectStoreToken() localStorage.setItem('stsToken', JSON.stringify(res)) } - const urlParams = new URLSearchParams(window.location.search) - - const trialId = urlParams.get('trialId') // res.Result.ObjectStoreUse = 'AWS'; Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] } Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse; @@ -56,6 +53,8 @@ async function ossGenerateSTS() { } let res = await OSSclient.put(objectName, object) if (res && res.url) { + const urlParams = new URLSearchParams(window.location.search) + const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { let params = Object.assign({path: objectName}, fileInfo) addOrUpdateFileUploadRecord(params) @@ -106,6 +105,8 @@ async function ossGenerateSTS() { } let res = await customerHttp(OSSclient, data, progress); if (res) { + const urlParams = new URLSearchParams(window.location.search) + const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { let params = Object.assign({path: data.path}, fileInfo) addOrUpdateFileUploadRecord(params)