feat(admin+api+player): 优胜赛结算态、禁止新增单场与钱包流水展示优化
- API/管理端:优胜赛 SETTLED 后禁止新增单场,列表与子页展示结算状态 - 玩家端:已结算 outright 只读展示并高亮冠军 - 管理端:结算后 stale 标记驱动列表刷新;财务流水时间与备注 i18n 优化 - shared:txDisplayAmount 与 LEAGUE_OUTRIGHT_SETTLED 错误码
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, ref, watch, onActivated } from 'vue';
|
||||
import { consumeAdminListStale } from '../../utils/adminListStale';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { useAdminLocale } from '../../composables/useAdminLocale';
|
||||
@@ -237,9 +238,9 @@ function goSettle() {
|
||||
});
|
||||
}
|
||||
|
||||
async function load() {
|
||||
async function load(options: { silent?: boolean } = {}) {
|
||||
if (!props.leagueId) return;
|
||||
loading.value = true;
|
||||
if (!options.silent) loading.value = true;
|
||||
try {
|
||||
const { data } = await api.get(`/admin/leagues/${props.leagueId}/outright`);
|
||||
const payload = data.data as {
|
||||
@@ -283,10 +284,18 @@ async function load() {
|
||||
const err = e as { response?: { data?: { error?: string } } };
|
||||
ElMessage.error(err.response?.data?.error ?? t('msg.load_failed'));
|
||||
} finally {
|
||||
loading.value = false;
|
||||
if (!options.silent) loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onActivated(() => {
|
||||
if (!props.leagueId) return;
|
||||
const stale = consumeAdminListStale();
|
||||
if (stale || matchId.value || selections.value.length > 0) {
|
||||
void load({ silent: !stale && Boolean(matchId.value || selections.value.length) });
|
||||
}
|
||||
});
|
||||
|
||||
function resetCustomTeamForm() {
|
||||
customTeam.value = { teamCode: '', teamZh: '', teamEn: '', logoUrl: '' };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user