feat: 配方卡片加入上传个人二维码功能 #5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user