fix: 搜索过滤收藏、拼音首字母匹配、清除图片、滑动切换、通知已读
1. 搜索时收藏配方也按关键词过滤,不匹配的隐藏
2. 编辑配方添加精油时支持拼音首字母匹配(如xyc→薰衣草)
3. 品牌设置页清除图片立即保存到后端,不需点保存按钮
4. 左右滑动切换tab,轮播区域内滑动切换图片不触发tab切换
5. 通知列表每条未读通知加"已读"按钮,调用POST /api/notifications/{id}/read
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -574,6 +574,26 @@ 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 {
|
||||
|
||||
Reference in New Issue
Block a user