mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-23 05:45:46 +08:00
🏷️ 更新活动日历相关类型定义,增加卡池状态和类型枚举
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="subtitle">
|
||||
<!-- 处理幽境危战 -->
|
||||
<template v-if="props.pos.type === gameEnum.actCalendarType.HardChallenge">
|
||||
<template v-if="props.pos.type === gameEnum.actCalendar.actType.HardChallenge">
|
||||
<div class="challenge-append" title="点击前往幽境页面" @click="toChallenge()">
|
||||
<template v-if="!props.pos.hard_challenge_detail.is_unlock">
|
||||
<span>未解锁</span>
|
||||
@@ -37,13 +37,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<!-- 处理真境剧诗 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.RoleCombat">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.RoleCombat">
|
||||
<div class="combat-append" title="点击前往剧诗页面" @click="toCombat()">
|
||||
<span>{{ getCombatStat(props.pos.role_combat_detail) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 处理深境螺旋 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.Tower">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.Tower">
|
||||
<div class="abyss-append" title="点击前往深渊页面" @click="toAbyss()">
|
||||
<template v-if="!props.pos.tower_detail.is_unlock">
|
||||
<span>未解锁</span>
|
||||
@@ -60,17 +60,17 @@
|
||||
</div>
|
||||
</template>
|
||||
<!-- 处理区域探索 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.Explore">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.Explore">
|
||||
<span>当前区域探索度: {{ props.pos.explore_detail.explore_percent }}%</span>
|
||||
</template>
|
||||
<!-- 处理双倍经验 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.Double">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.Double">
|
||||
<span>
|
||||
剩余双倍次数: {{ props.pos.double_detail.left }}/{{ props.pos.double_detail.total }}
|
||||
</span>
|
||||
</template>
|
||||
<!-- 处理立本活动 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.LiBen">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.LiBen">
|
||||
<span>当天{{ props.pos.liben_detail.status === 1 ? "未" : "已" }}兑换</span>
|
||||
<span>{{ props.pos.liben_detail.progress }}/{{ props.pos.liben_detail.total }}</span>
|
||||
<span>
|
||||
@@ -78,7 +78,7 @@
|
||||
</span>
|
||||
</template>
|
||||
<!-- 处理累登活动 -->
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendarType.SignIn">
|
||||
<template v-else-if="props.pos.type === gameEnum.actCalendar.actType.SignIn">
|
||||
<span>{{ props.pos.sign_in_detail.progress }}/{{ props.pos.sign_in_detail.total }}</span>
|
||||
<span>当天{{ props.pos.sign_in_detail.status === 1 ? "未领取" : "已领取" }}</span>
|
||||
</template>
|
||||
@@ -138,7 +138,7 @@ const isStart = computed<boolean>(() => {
|
||||
return props.pos.start_timestamp !== "0";
|
||||
});
|
||||
const isFin = computed<boolean>(() => {
|
||||
if (props.pos.type === gameEnum.actCalendarType.LiBen) {
|
||||
if (props.pos.type === gameEnum.actCalendar.actType.LiBen) {
|
||||
return props.pos.liben_detail.is_has_taken_special_reward;
|
||||
}
|
||||
return props.pos.is_finished;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 游戏相关枚举
|
||||
* @since Beta v0.9.9
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,7 @@ function getGameServerDesc(server: TGApp.Game.Base.ServerTypeEnum): string {
|
||||
/**
|
||||
* 近期活动活动类型枚举
|
||||
* @since Beta v0.9.0
|
||||
* @see TGApp.Game.ActCalendar.ActTypeEnum
|
||||
* @see TGApp.Game.ActCalendar.ActTypeEnum
|
||||
*/
|
||||
const ActCalendarTypeEnum: typeof TGApp.Game.ActCalendar.ActType = {
|
||||
HardChallenge: "ActTypeHardChallenge",
|
||||
@@ -69,6 +69,28 @@ const ActCalendarTypeEnum: typeof TGApp.Game.ActCalendar.ActType = {
|
||||
Other: "ActTypeOther",
|
||||
};
|
||||
|
||||
/**
|
||||
* 卡池状态枚举
|
||||
* @since Beta v0.10.2
|
||||
* @see TGApp.Game.ActCalendar.PoolStatusEnum
|
||||
*/
|
||||
const ActCalendarPoolStatusEnum: typeof TGApp.Game.ActCalendar.PoolStatus = {
|
||||
NotStart: 1,
|
||||
Ongoing: 2,
|
||||
Ended: 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* 卡池类型枚举
|
||||
* @since Beta v0.10.2
|
||||
* @see TGApp.Game.ActCalendar.PoolTypeEnum
|
||||
*/
|
||||
const ActCalendarPoolTypeEnum: typeof TGApp.Game.ActCalendar.PoolType = {
|
||||
Avatar: 1,
|
||||
Weapon: 2,
|
||||
Mixed: 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* 祈愿类型枚举
|
||||
* @since Beta v0.9.1
|
||||
@@ -257,7 +279,11 @@ const CombatCharMasterStatEnum: typeof TGApp.Game.Combat.CharMasterStat = {
|
||||
|
||||
/** 游戏相关枚举 */
|
||||
const gameEnum = {
|
||||
actCalendarType: ActCalendarTypeEnum,
|
||||
actCalendar: {
|
||||
actType: ActCalendarTypeEnum,
|
||||
poolStatus: ActCalendarPoolStatusEnum,
|
||||
poolType: ActCalendarPoolTypeEnum,
|
||||
},
|
||||
gachaType: GachaTypeEnum,
|
||||
server: GameServerEnum,
|
||||
serverList: GameServerList,
|
||||
|
||||
56
src/types/Game/ActCalendar.d.ts
vendored
56
src/types/Game/ActCalendar.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 游戏-活动日历相关类型定义文件
|
||||
* @since Beta v0.10.1
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Game.ActCalendar {
|
||||
@@ -33,9 +33,47 @@ declare namespace TGApp.Game.ActCalendar {
|
||||
selected_act_list: Array<ActItem>;
|
||||
};
|
||||
|
||||
/**
|
||||
* 卡池状态枚举
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
const PoolStatus = <const>{
|
||||
/** 未开始 */
|
||||
NotStart: 1,
|
||||
/** 进行中 */
|
||||
Ongoing: 2,
|
||||
/** 已结束 */
|
||||
Ended: 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* 卡池状态枚举类型
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
type PoolStatusEnum = (typeof PoolStatus)[keyof typeof PoolStatus];
|
||||
|
||||
/**
|
||||
* 卡池类型枚举
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
const PoolType = <const>{
|
||||
/** 角色活动祈愿 */
|
||||
Avatar: 1,
|
||||
/** 武器活动祈愿 */
|
||||
Weapon: 2,
|
||||
/** 集录祈愿 */
|
||||
Mixed: 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* 卡池类型枚举类型
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
type PoolTypeEnum = (typeof PoolType)[keyof typeof PoolType];
|
||||
|
||||
/**
|
||||
* 活动卡池信息
|
||||
* @since Beta v0.8.0
|
||||
* @since Beta v0.10.2
|
||||
*/
|
||||
type ActPool = {
|
||||
/** 卡池id */
|
||||
@@ -44,8 +82,8 @@ declare namespace TGApp.Game.ActCalendar {
|
||||
version_name: string;
|
||||
/** 卡池名称 - 角色活动祈愿 */
|
||||
pool_name: string;
|
||||
/** 卡池类型 - 1:角色活动祈愿, 2:武器活动祈愿, 3:混合活动祈愿 */
|
||||
pool_type: number;
|
||||
/** 卡池类型 */
|
||||
pool_type: TGApp.Game.ActCalendar.PoolTypeEnum;
|
||||
/** 角色列表 */
|
||||
avatars: Array<ActPoolAvatar>;
|
||||
/** 武器列表 */
|
||||
@@ -60,14 +98,8 @@ declare namespace TGApp.Game.ActCalendar {
|
||||
end_time: TGApp.Game.Base.DateTime;
|
||||
/** 跳转链接 */
|
||||
jump_url: string;
|
||||
/**
|
||||
* 卡池状态
|
||||
* @example
|
||||
* 1:未开始
|
||||
* 2:进行中
|
||||
* 3:已结束
|
||||
*/
|
||||
pool_status: number;
|
||||
/** 卡池状态 */
|
||||
pool_status: TGApp.Game.ActCalendar.PoolStatusEnum;
|
||||
/** 距离结束倒计时(秒) */
|
||||
countdown_seconds: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user