fix: 上传图片后不再自动跳转,由用户手动点击返回配方卡片
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m21s

Co-Authored-By: YoYo <yoyo@euphon.net>
This commit is contained in:
2026-04-08 19:41:04 +00:00
parent de74ffe638
commit 533cd2a0bd

View File

@@ -428,18 +428,7 @@ async function handleUpload(type, event) {
if (res.ok) {
if (type === 'logo') brandLogo.value = base64
else if (type === 'bg') brandBg.value = base64
else if (type === 'qr') {
brandQrImage.value = base64
// If user came here from a recipe card, navigate back
const returnRecipeId = localStorage.getItem('oil_return_recipe_id')
if (returnRecipeId) {
localStorage.removeItem('oil_return_recipe_id')
ui.showToast('二维码已上传,返回配方卡片 ✨')
await new Promise(r => setTimeout(r, 800))
router.push('/?openRecipe=' + encodeURIComponent(returnRecipeId))
return
}
}
else if (type === 'qr') brandQrImage.value = base64
ui.showToast('上传成功')
}
} catch {