mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 更新设置和组件,增强用户通知功能, 修复用户订单记录渲染
- 在 Setting_SendEmail 接口中新增 receiveOrder 字段,支持积分礼物兑换通知。 - 优化 PointOrderCard 组件,处理用户信息时增加安全性。 - 更新 ViewerLayout 组件,异步获取用户数据逻辑简化。 - 在 SettingsManageView 中新增积分礼物兑换邮件通知选项。 - 增强 PointSettings 组件,添加通知设置保存功能。 - 更新 QuestionBoxView 组件样式,提升视觉效果。
This commit is contained in:
@@ -138,6 +138,27 @@ async function deleteGift(name: string) {
|
||||
async function updateGift() {
|
||||
return await updateSettings()
|
||||
}
|
||||
|
||||
// 更新账户通知设置
|
||||
async function SaveComboSetting() {
|
||||
if (!accountInfo.value) return false
|
||||
|
||||
isLoading.value = true
|
||||
try {
|
||||
const msg = await SaveSetting('SendEmail', accountInfo.value.settings.sendEmail)
|
||||
if (msg) {
|
||||
message.success('已保存')
|
||||
return true
|
||||
} else {
|
||||
message.error('保存失败: ' + msg)
|
||||
}
|
||||
} catch (err) {
|
||||
message.error('修改失败: ' + err)
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
}
|
||||
return false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -175,6 +196,21 @@ async function updateGift() {
|
||||
vertical
|
||||
:gap="12"
|
||||
>
|
||||
<!-- 通知设置 -->
|
||||
<NFlex
|
||||
align="center"
|
||||
:gap="12"
|
||||
>
|
||||
<span>通知设置:</span>
|
||||
<NCheckbox
|
||||
v-model:checked="accountInfo.settings.sendEmail.receiveOrder"
|
||||
:disabled="!canEdit"
|
||||
@update:checked="SaveComboSetting"
|
||||
>
|
||||
积分礼物有新用户兑换时发送邮件
|
||||
</NCheckbox>
|
||||
</NFlex>
|
||||
|
||||
<!-- 积分来源设置 -->
|
||||
<NFlex
|
||||
align="center"
|
||||
|
||||
Reference in New Issue
Block a user