fix: 修复 rebase 后重复 clearBrandImage 声明 + 测试加 dismissDialog
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m22s

- 删除 MyDiary.vue 重复的 clearBrandImage 函数(rebase 遗留)
- 测试加 dismissDialog() 关闭 CI 中 API 错误弹出的 dialog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 19:06:22 +00:00
parent 04ff28bf45
commit 2864a50550
2 changed files with 24 additions and 29 deletions

View File

@@ -574,26 +574,6 @@ async function clearBrandImage(type) {
}
}
async function clearBrandImage(type) {
const fieldMap = { logo: 'brand_logo', bg: 'brand_bg', qr: 'qr_code' }
const field = fieldMap[type]
if (!field) return
try {
const res = await api('/api/brand', {
method: 'PUT',
body: JSON.stringify({ [field]: '' }),
})
if (res.ok) {
if (type === 'logo') brandLogo.value = ''
else if (type === 'bg') brandBg.value = ''
else if (type === 'qr') brandQrImage.value = ''
ui.showToast('已清除')
}
} catch {
ui.showToast('清除失败')
}
}
// Account
async function updateDisplayName() {
try {