From 478adcde21c63acb7cf2817c55660dcd2b12af2f Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 2 Apr 2026 17:35:20 +0800 Subject: [PATCH] 1 --- src/utils/oss.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/oss.js b/src/utils/oss.js index c6543243..dba5248f 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -23,7 +23,9 @@ async function ossGenerateSTS() { res = await GetObjectStoreToken() localStorage.setItem('stsToken', JSON.stringify(res)) } - let trialId = this.$route.query.trialId + 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; @@ -228,7 +230,9 @@ function uploadAWS(aws, data, progress, fileInfo) { data.path = data.path.replace(`/${bucketName}/`, ''); await exist(aws, bucketName, data, progress, (path, status) => { if (status === 'success') { - let trialId = this.$route.query.trialId + const urlParams = new URLSearchParams(window.location.search) + + const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo) addOrUpdateFileUploadRecord(params)