diff --git a/src/api/api-models.ts b/src/api/api-models.ts index 561183a..0465d48 100644 --- a/src/api/api-models.ts +++ b/src/api/api-models.ts @@ -228,6 +228,7 @@ export interface Setting_Point { scPointPercent: number // double maps to number in TypeScript giftPointPercent: number // double maps to number in TypeScript giftAllowType: SettingPointGiftAllowType + shouldDiscontinueWhenSoldOut: boolean // 签到系统设置 enableCheckIn: boolean // 是否启用签到功能 diff --git a/src/components/manage/PointHistoryCard.vue b/src/components/manage/PointHistoryCard.vue index 9c672f2..4d4c933 100644 --- a/src/components/manage/PointHistoryCard.vue +++ b/src/components/manage/PointHistoryCard.vue @@ -94,13 +94,43 @@ const historyColumn: DataTableColumns = [ : null, ]) case PointFrom.Manual: - return h( - NTag, - { type: row.point > 0 ? 'success' : 'error', bordered: false, size: 'small' }, - () => '主播' + (row.point > 0 ? '赠予' : '扣除'), - ) + return h(NFlex, { align: 'center' }, () => [ + h( + NTag, + { type: row.point > 0 ? 'success' : 'error', bordered: false, size: 'small' }, + () => '主播' + (row.point > 0 ? '赠予' : '扣除'), + ), + row.extra?.user + ? h( + NButton, + { + tag: 'a', + href: '/@' + row.extra.user?.name, + target: '_blank', + text: true, + type: 'info', + }, + () => row.extra.user?.name, + ) + : null, + ]) case PointFrom.Use: - return h(NTag, { type: 'warning', bordered: false, size: 'small' }, () => '使用') + return h(NFlex, { align: 'center' }, () => [ + h(NTag, { type: 'warning', bordered: false, size: 'small' }, () => '使用'), + row.extra?.user + ? h( + NButton, + { + tag: 'a', + href: '/@' + row.extra.user?.name, + target: '_blank', + text: true, + type: 'success', + }, + () => row.extra.user?.name, + ) + : null, + ]) case PointFrom.CheckIn: return h(NFlex, { align: 'center' }, () => [ h(NTag, { type: 'success', bordered: false, size: 'small' }, () => '签到'), @@ -131,12 +161,12 @@ const historyColumn: DataTableColumns = [ case PointFrom.Danmaku: switch (row.type) { case EventDataTypes.Guard: - return h(NFlex, { justify: 'center', align: 'center' }, () => [ + return h(NFlex, { align: 'center' }, () => [ h(NTag, { type: 'error', size: 'small' }, () => '上舰'), row.extra?.danmaku.msg, ]) case EventDataTypes.Gift: - return h(NFlex, { justify: 'center', align: 'center' }, () => [ + return h(NFlex, { align: 'center' }, () => [ h(NTag, { type: 'info', size: 'small', style: { margin: '0' } }, () => '礼物'), row.extra?.danmaku.msg, h( @@ -146,7 +176,7 @@ const historyColumn: DataTableColumns = [ ), ]) case EventDataTypes.SC: - return h(NFlex, { justify: 'center' }, () => [ + return h(NFlex, { align: 'center' }, () => [ h(NTag, { type: 'warning', size: 'small', style: { margin: '0' } }, () => 'SC'), row.extra?.danmaku.price, ]) diff --git a/src/views/manage/point/PointSettings.vue b/src/views/manage/point/PointSettings.vue index ced7a31..af6df16 100644 --- a/src/views/manage/point/PointSettings.vue +++ b/src/views/manage/point/PointSettings.vue @@ -54,6 +54,7 @@ const defaultSettingPoint: Setting_Point = { maxBonusPoints: 0, allowSelfCheckIn: false, requireAuth: false, + shouldDiscontinueWhenSoldOut: false, } // 响应式设置对象 @@ -262,6 +263,20 @@ async function SaveComboSetting() { + + 其他: + + 礼物售罄时自动下架 + + + { - {{ addPointCount > 0 ? '给予' : '扣除' }} + {{ !addPointCount || addPointCount === 0 ? '确定' : (addPointCount > 0 ? '给予' : '扣除') }} diff --git a/src/views/manage/point/PointUserManage.vue b/src/views/manage/point/PointUserManage.vue index ed804b9..d3f8580 100644 --- a/src/views/manage/point/PointUserManage.vue +++ b/src/views/manage/point/PointUserManage.vue @@ -577,9 +577,10 @@ onMounted(async () => { - {{ addPointCount > 0 ? '给予' : '扣除' }} + {{ !addPointCount || addPointCount === 0 ? '确定' : (addPointCount > 0 ? '给予' : '扣除') }} diff --git a/src/views/pointViews/PointUserHistoryView.vue b/src/views/pointViews/PointUserHistoryView.vue index cb3fb0a..e1ca1e8 100644 --- a/src/views/pointViews/PointUserHistoryView.vue +++ b/src/views/pointViews/PointUserHistoryView.vue @@ -1,16 +1,17 @@