fix: cookie加密后cloud.service.ts未解密导致API 401; 更新版本号至2.1.1/1.1.9

This commit is contained in:
2026-05-15 18:23:40 +08:00
parent a12fec4d82
commit 4b9bcd7a96
8 changed files with 42 additions and 24 deletions

View File

@@ -351,7 +351,7 @@ async function handleToggleTransfer(row: CloudConfig, enabled: boolean) {
nickname: row.nickname || '',
promotion_account: row.promotion_account || '',
is_transfer_enabled: newVal,
is_active: row.is_active !== 0,
is_active: row.is_active,
cookie: undefined, // don't send cookie on toggle-only
})
row.is_transfer_enabled = newVal
@@ -503,9 +503,9 @@ async function handleSave() {
cloud_type: form.cloud_type as CloudType,
nickname: form.nickname,
promotion_account: form.promotion_account,
is_transfer_enabled: form.is_transfer_enabled,
is_transfer_enabled: form.is_transfer_enabled ? 1 : 0,
cookie: form.cookie || undefined,
is_active: true,
is_active: 1,
storage_used: form._storageUsed || undefined,
storage_total: form._storageTotal || undefined,
})
@@ -515,9 +515,9 @@ async function handleSave() {
cloud_type: form.cloud_type as CloudType,
nickname: form.nickname,
promotion_account: form.promotion_account,
is_transfer_enabled: form.is_transfer_enabled,
is_transfer_enabled: form.is_transfer_enabled ? 1 : 0,
cookie: form.cookie,
is_active: true,
is_active: 1,
storage_used: form._storageUsed || undefined,
storage_total: form._storageTotal || undefined,
})

View File

@@ -93,7 +93,7 @@
</div>
<div class="detail-cell" v-if="row.file_size">
<span class="detail-label">文件大小</span>
<code class="detail-code">{{ formatFileSize(row.file_size) }}</code>
<code class="detail-code">{{ row.file_size ? (function(n){if(n==null||n==='')return'-';var v=typeof n==='string'?parseInt(n,10):n;if(!v||v<=0)return'-';var u=['B','KB','MB','GB','TB'];var i=0,s=v;while(s>=1024&&i<4){s/=1024;i++}return s.toFixed(i===0?0:2)+' '+u[i]})(row.file_size) : '-' }}</code>
</div>
<div class="detail-cell" v-if="row.status !== 'reused' && (row.folder_count > 0 || row.file_count > 0)">
<span class="detail-label">文件夹</span>
@@ -157,7 +157,13 @@
<div class="detail-row" v-if="row.status === 'failed' && row.error_message">
<div class="detail-cell detail-full">
<span class="detail-label">错误信息</span>
<pre class="detail-error">{{ row.error_message }}</pre>
<pre class="detail-error">{{ row.error_message.includes(' | ') ? row.error_message.split(' | ')[1] : row.error_message.split(' | ')[0] }}</pre>
</div>
</div>
<div class="detail-row" v-if="row.status === 'failed' && row.error_message && row.error_message.includes(' | ')">
<div class="detail-cell detail-full">
<span class="detail-label">友好提示</span>
<pre class="detail-error">{{ row.error_message.split(' | ')[0] }}</pre>
</div>
</div>
</div>