feat: 更新API模型和组件以支持售罄自动下架功能

- 在api-models.ts中为设置添加shouldDiscontinueWhenSoldOut字段
- 在PointSettings.vue中新增售罄自动下架的选项
- 在多个组件中调整按钮文本和状态逻辑
- 在PointUserHistoryView.vue中添加主播筛选功能
This commit is contained in:
2025-05-06 10:06:34 +08:00
parent a5420e5914
commit 7614880d34
6 changed files with 123 additions and 19 deletions

View File

@@ -54,6 +54,7 @@ const defaultSettingPoint: Setting_Point = {
maxBonusPoints: 0,
allowSelfCheckIn: false,
requireAuth: false,
shouldDiscontinueWhenSoldOut: false,
}
// 响应式设置对象
@@ -262,6 +263,20 @@ async function SaveComboSetting() {
</NCheckbox>
</NFlex>
<NFlex
align="center"
:gap="12"
>
<span>其他: </span>
<NCheckbox
v-model:checked="setting.shouldDiscontinueWhenSoldOut"
:disabled="!canEdit"
@update:checked="updateSettings"
>
礼物售罄时自动下架
</NCheckbox>
</NFlex>
<!-- 积分来源设置 -->
<NFlex
align="center"