Compare commits

...

2 Commits

Author SHA1 Message Date
DESKTOP-6C3NK6N\WXS 25d8ee6bc5 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is failing Details
2024-09-13 10:23:37 +08:00
DESKTOP-6C3NK6N\WXS 0f29a2971c 临时凭证获取 2024-09-13 10:23:24 +08:00
1 changed files with 8 additions and 1 deletions

View File

@ -15,7 +15,14 @@ Vue.prototype.OSSclientConfig = {
async function ossGenerateSTS() {
let res = await GetObjectStoreToken()
let res = null;
if (localStorage.getItem('stsToken')) {
res = JSON.parse(localStorage.getItem('stsToken'))
} else {
res = await GetObjectStoreToken()
localStorage.setItem('stsToken', JSON.stringify(res))
}
// res.Result.ObjectStoreUse = 'AWS';
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;