👽️ 更新用户活动日历处理

This commit is contained in:
BTMuli
2025-12-11 17:23:54 +08:00
parent abe34b8ee5
commit 073cd5e35d
11 changed files with 349 additions and 209 deletions

View File

@@ -6,20 +6,20 @@
<img alt="icon" src="/source/UI/userChallenge.webp" />
<span>幽境危战</span>
<v-select
density="compact"
variant="outlined"
v-model="uidCur"
:items="uidList"
:hide-details="true"
:items="uidList"
density="compact"
label="游戏UID"
variant="outlined"
@update:model-value="switchUid"
/>
<v-btn :rounded="true" class="ucp-btn" @click="toAbyss()">
<img src="/source/UI/userAbyss.webp" alt="abyss" />
<img alt="abyss" src="/source/UI/userAbyss.webp" />
<span>深境螺旋</span>
</v-btn>
<v-btn :rounded="true" class="ucp-btn" @click="toCombat()">
<img src="/source/UI/userCombat.webp" alt="abyss" />
<img alt="abyss" src="/source/UI/userCombat.webp" />
<span>真境剧诗</span>
</v-btn>
</div>
@@ -27,14 +27,14 @@
<template #append>
<div class="ucp-top-append">
<v-select
:items="serverList"
v-model="server"
:disabled="reqPop"
:items="serverList"
density="compact"
item-title="text"
item-value="value"
label="服务器"
width="200px"
density="compact"
:disabled="reqPop"
/>
</div>
</template>
@@ -42,28 +42,28 @@
<div class="ucp-top-extension">
<div class="act-list">
<v-btn
class="ucp-btn"
@click="shareChallenge()"
:disabled="localChallenge.length === 0"
class="ucp-btn"
prepend-icon="mdi-share"
@click="shareChallenge()"
>
分享
</v-btn>
<v-btn class="ucp-btn" @click="refreshChallenge()" prepend-icon="mdi-refresh">刷新</v-btn>
<v-btn class="ucp-btn" @click="tryReadChallenge()" prepend-icon="mdi-download">
<v-btn class="ucp-btn" prepend-icon="mdi-refresh" @click="refreshChallenge()">刷新</v-btn>
<v-btn class="ucp-btn" prepend-icon="mdi-download" @click="tryReadChallenge()">
导入
</v-btn>
<v-btn class="ucp-btn" @click="deleteChallenge()" prepend-icon="mdi-delete">删除</v-btn>
<v-btn class="ucp-btn" prepend-icon="mdi-delete" @click="deleteChallenge()">删除</v-btn>
</div>
<div class="pop-list">
<TucPopItem v-for="avatar in popList" :key="avatar.avatar_id" :avatar />
<v-btn
:loading="reqPop"
size="36"
class="pop-btn"
@click="refreshPopList"
icon="mdi-refresh"
:disabled="reqPop"
:loading="reqPop"
class="pop-btn"
icon="mdi-refresh"
size="36"
@click="refreshPopList"
/>
</div>
</div>
@@ -71,11 +71,11 @@
</v-app-bar>
<div class="user-challenge-box">
<v-tabs
v-model="userTab"
direction="vertical"
class="ucb-tabs"
center-active
v-if="localChallenge.length > 0"
v-model="userTab"
center-active
class="ucb-tabs"
direction="vertical"
>
<v-tab v-for="item in localChallenge" :key="item.id" :value="item.id">
<div class="ucb-tab">
@@ -102,14 +102,14 @@
幽境危战 | UID-{{ item.uid }} | Render by TeyvatGuide v{{ version }}
</div>
</div>
<TucBlings :data="item.blings" v-if="item.blings.length > 0" />
<TucOverview title="单人模式" :data="item.single" />
<TucOverview title="联机模式" :data="item.mp" v-if="item.mp.has_data" />
<TucBlings v-if="item.blings.length > 0" :data="item.blings" />
<TucOverview :data="item.single" title="单人模式" />
<TucOverview v-if="item.mp.has_data" :data="item.mp" title="联机模式" />
</div>
</v-window-item>
</v-window>
<div v-show="localChallenge.length === 0" class="ucb-empty">
<img src="/source/UI/empty.webp" alt="empty" />
<img alt="empty" src="/source/UI/empty.webp" />
<span>暂无数据请尝试刷新</span>
</div>
</div>
@@ -276,6 +276,7 @@ async function refreshChallenge(): Promise<void> {
await TGLogger.Info("[UserChallenge][refreshChallenge] 开始刷新挑战数据");
await showLoading.start(`正在获取${account.value.gameUid}的幽境危战数据`);
const resp = await recordReq.challenge.detail(cookie.value, account.value);
console.log(resp);
if ("retcode" in resp) {
await showLoading.end();
isReq.value = false;
@@ -326,6 +327,7 @@ async function refreshPopList(hint: boolean = true): Promise<void> {
await showLoading.start("正在加载赋光之人列表", `服务器: ${getGameServerDesc(server.value)}`);
}
const resp = await recordReq.challenge.pop(server.value);
console.log("赋光之人列表", resp);
if (resp.retcode !== 0) {
reqPop.value = false;
showSnackbar.error(`[${resp.retcode}] ${resp.message}`);

View File

@@ -1,23 +1,24 @@
<!-- 首页 -->
<template>
<div class="home-container">
<div class="home-top">
<div class="home-tools" v-if="isLogin">
<div v-if="isLogin" class="home-tools">
<v-select
v-model="curGid"
class="home-tool-select"
:items="games"
:hide-details="true"
:items="games"
class="home-tool-select"
item-value="gid"
label="小工具(右侧)分区"
variant="outlined"
label="分区"
>
<template #selection="{ item }">
<div class="select-item main">
<TMiImg
v-if="item.raw.icon"
:alt="item.raw.title"
:ori="true"
:src="item.raw.icon"
:alt="item.raw.title"
:title="item.raw.title"
class="icon"
/>
@@ -26,14 +27,14 @@
</template>
<template #item="{ props, item }">
<div
v-bind="props"
class="select-item sub"
:class="item.raw.gid === curGid ? 'selected' : ''"
class="select-item sub"
v-bind="props"
>
<TMiImg
v-if="item.raw.icon"
:src="item.raw.icon"
:alt="item.raw.title"
:src="item.raw.icon"
:title="item.raw.title"
class="icon"
/>
@@ -45,16 +46,16 @@
</div>
<div class="home-select">
<v-select
width="300px"
variant="outlined"
v-model="showItems"
:items="showItemsAll"
:hide-details="true"
:multiple="true"
:chips="true"
:hide-details="true"
:items="showItemsAll"
:multiple="true"
label="首页组件显示"
variant="outlined"
width="300px"
/>
<v-btn class="select-btn" @click="submitHome" :rounded="true">确定</v-btn>
<v-btn :rounded="true" class="select-btn" @click="submitHome">确定</v-btn>
</div>
</div>
<component :is="item" v-for="item in components" :key="item" @success="loadEnd(item)" />