mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
✏️ 类型修正 nameCase → NameCase
This commit is contained in:
@@ -4,25 +4,25 @@
|
|||||||
<div class="hta-oob-title">数据收集统计</div>
|
<div class="hta-oob-title">数据收集统计</div>
|
||||||
<div class="hta-oob-item">
|
<div class="hta-oob-item">
|
||||||
<span>当期深渊ID</span>
|
<span>当期深渊ID</span>
|
||||||
<span>{{ props.data.scheduleId }}</span>
|
<span>{{ props.data.ScheduleId }}</span>
|
||||||
<span>上传记录总数</span>
|
<span>上传记录总数</span>
|
||||||
<span>{{ props.data.recordTotal }}</span>
|
<span>{{ props.data.RecordTotal }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="hta-oob-title">深渊数据统计</div>
|
<div class="hta-oob-title">深渊数据统计</div>
|
||||||
<div class="hta-oob-item">
|
<div class="hta-oob-item">
|
||||||
<span>总计深渊记录</span>
|
<span>总计深渊记录</span>
|
||||||
<span>{{ props.data.spiralAbyssTotal }}</span>
|
<span>{{ props.data.SpiralAbyssTotal }}</span>
|
||||||
<span>通关深渊记录</span>
|
<span>通关深渊记录</span>
|
||||||
<span>{{ props.data.spiralAbyssPassed }}</span>
|
<span>{{ props.data.SpiralAbyssPassed }}</span>
|
||||||
<span>满星深渊记录</span>
|
<span>满星深渊记录</span>
|
||||||
<span>{{ props.data.spiralAbyssFullStar }}</span>
|
<span>{{ props.data.SpiralAbyssFullStar }}</span>
|
||||||
<span>平均获取渊星</span>
|
<span>平均获取渊星</span>
|
||||||
<span>{{
|
<span>{{
|
||||||
(props.data.spiralAbyssStarTotal / props.data.spiralAbyssTotal).toFixed(2)
|
(props.data.SpiralAbyssStarTotal / props.data.SpiralAbyssTotal).toFixed(2)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span>平均战斗次数</span>
|
<span>平均战斗次数</span>
|
||||||
<span>{{
|
<span>{{
|
||||||
(props.data.spiralAbyssBattleTotal / props.data.spiralAbyssTotal).toFixed(2)
|
(props.data.SpiralAbyssBattleTotal / props.data.SpiralAbyssTotal).toFixed(2)
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
<th>6命</th>
|
<th>6命</th>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<tr v-for="item in props.modelValue" :key="item.holdingRate" class="hta-th-tr">
|
<tr v-for="item in props.modelValue" :key="item.HoldingRate" class="hta-th-tr">
|
||||||
<td class="hta-th-td">
|
<td class="hta-th-td">
|
||||||
<TibWikiAbyss2 v-model="item.avatarId" />
|
<TibWikiAbyss2 v-model="item.AvatarId" />
|
||||||
</td>
|
</td>
|
||||||
<td>{{ (item.holdingRate * 100).toFixed(3) }}%</td>
|
<td>{{ (item.HoldingRate * 100).toFixed(3) }}%</td>
|
||||||
<td v-for="rate in item.constellations" :key="rate.item">
|
<td v-for="rate in item.Constellations" :key="rate.Item">
|
||||||
{{ (rate.rate * 100).toFixed(3) }}%
|
{{ (rate.Rate * 100).toFixed(3) }}%
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -11,28 +11,28 @@
|
|||||||
<div v-if="select" class="hta-tt-flex">
|
<div v-if="select" class="hta-tt-flex">
|
||||||
<div class="hta-tuf-box">
|
<div class="hta-tuf-box">
|
||||||
<div class="hta-tuf-title">上半</div>
|
<div class="hta-tuf-title">上半</div>
|
||||||
<div v-for="items in select.up" :key="items.rate" class="hta-tuf-item">
|
<div v-for="items in select.Up" :key="items.Rate" class="hta-tuf-item">
|
||||||
<div class="hta-tuf-item-icons">
|
<div class="hta-tuf-item-icons">
|
||||||
<TibWikiAbyss2
|
<TibWikiAbyss2
|
||||||
v-for="item in items.item.split(',')"
|
v-for="item in items.Item.split(',')"
|
||||||
:key="item"
|
:key="item"
|
||||||
:model-value="item"
|
:model-value="item"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="hta-tuf-item-rate">上场{{ items.rate }}次</div>
|
<div class="hta-tuf-item-rate">上场{{ items.Rate }}次</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hta-tuf-box">
|
<div class="hta-tuf-box">
|
||||||
<div class="hta-tuf-title">下半</div>
|
<div class="hta-tuf-title">下半</div>
|
||||||
<div v-for="items in select.down" :key="items.rate" class="hta-tuf-item">
|
<div v-for="items in select.Down" :key="items.Rate" class="hta-tuf-item">
|
||||||
<div class="hta-tuf-item-icons">
|
<div class="hta-tuf-item-icons">
|
||||||
<TibWikiAbyss2
|
<TibWikiAbyss2
|
||||||
v-for="item in items.item.split(',')"
|
v-for="item in items.Item.split(',')"
|
||||||
:key="item"
|
:key="item"
|
||||||
:model-value="item"
|
:model-value="item"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="hta-tuf-item-rate">上场{{ items.rate }}次</div>
|
<div class="hta-tuf-item-rate">上场{{ items.Rate }}次</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -56,9 +56,9 @@ const tab = ref<string>("9");
|
|||||||
const select = ref<TGApp.Plugins.Hutao.Abyss.TeamCombination>();
|
const select = ref<TGApp.Plugins.Hutao.Abyss.TeamCombination>();
|
||||||
|
|
||||||
function loadData(): void {
|
function loadData(): void {
|
||||||
select.value = props.modelValue.filter((item) => item.floor.toString() === tab.value)?.[0];
|
select.value = props.modelValue.filter((item) => item.Floor.toString() === tab.value)?.[0];
|
||||||
select.value?.up.sort((a, b) => b.rate - a.rate);
|
select.value?.Up.sort((a, b) => b.Rate - a.Rate);
|
||||||
select.value?.down.sort((a, b) => b.rate - a.rate);
|
select.value?.Down.sort((a, b) => b.Rate - a.Rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<v-window v-model="tab" class="hta-tu-window">
|
<v-window v-model="tab" class="hta-tu-window">
|
||||||
<v-window-item :value="tab">
|
<v-window-item :value="tab">
|
||||||
<div v-if="select" class="hta-tu-grid">
|
<div v-if="select" class="hta-tu-grid">
|
||||||
<TibWikiAbyss v-for="item in select.ranks" :key="item.item" :model-value="item" />
|
<TibWikiAbyss v-for="item in select.Ranks" :key="item.Item" :model-value="item" />
|
||||||
</div>
|
</div>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
</v-window>
|
</v-window>
|
||||||
@@ -31,8 +31,8 @@ const tab = ref<string>("9");
|
|||||||
const select = ref<TGApp.Plugins.Hutao.Abyss.AvatarUse>();
|
const select = ref<TGApp.Plugins.Hutao.Abyss.AvatarUse>();
|
||||||
|
|
||||||
function loadData(): void {
|
function loadData(): void {
|
||||||
select.value = props.modelValue.filter((item) => item.floor.toString() === tab.value)?.[0];
|
select.value = props.modelValue.filter((item) => item.Floor.toString() === tab.value)?.[0];
|
||||||
select.value?.ranks.sort((a, b) => b.rate - a.rate);
|
select.value?.Ranks.sort((a, b) => b.Rate - a.Rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<v-window v-model="tab" class="hta-tu-window">
|
<v-window v-model="tab" class="hta-tu-window">
|
||||||
<v-window-item :value="tab">
|
<v-window-item :value="tab">
|
||||||
<div v-if="select" class="hta-tu-grid">
|
<div v-if="select" class="hta-tu-grid">
|
||||||
<TibWikiAbyss v-for="item in select.ranks" :key="item.item" :model-value="item" />
|
<TibWikiAbyss v-for="item in select.Ranks" :key="item.Item" :model-value="item" />
|
||||||
</div>
|
</div>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
</v-window>
|
</v-window>
|
||||||
@@ -31,8 +31,8 @@ const tab = ref<string>("9");
|
|||||||
const select = ref<TGApp.Plugins.Hutao.Abyss.AvatarUse>();
|
const select = ref<TGApp.Plugins.Hutao.Abyss.AvatarUse>();
|
||||||
|
|
||||||
function loadData(): void {
|
function loadData(): void {
|
||||||
select.value = props.modelValue.filter((item) => item.floor.toString() === tab.value)?.[0];
|
select.value = props.modelValue.filter((item) => item.Floor.toString() === tab.value)?.[0];
|
||||||
select.value?.ranks.sort((a, b) => b.rate - a.rate);
|
select.value?.Ranks.sort((a, b) => b.Rate - a.Rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const props = defineProps<TibWikiAbyssProps>();
|
|||||||
const defaultAvatar = <TGApp.Sqlite.Character.AppData>{
|
const defaultAvatar = <TGApp.Sqlite.Character.AppData>{
|
||||||
birthday: "",
|
birthday: "",
|
||||||
element: "",
|
element: "",
|
||||||
id: props.modelValue,
|
id: Number(props.modelValue),
|
||||||
name: "旅行者",
|
name: "旅行者",
|
||||||
nameCard: "",
|
nameCard: "",
|
||||||
star: 5,
|
star: 5,
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// vue
|
// vue
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
import TItemBox, { TItemBoxData } from "../main/t-itembox.vue";
|
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||||
// plugins
|
// plugins
|
||||||
import TGSqlite from "../../plugins/Sqlite";
|
import TGSqlite from "../../plugins/Sqlite";
|
||||||
|
|
||||||
interface TibWikiAbyssProps {
|
interface TibWikiAbyssProps {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ const props = defineProps<TibWikiAbyssProps>();
|
|||||||
const defaultAvatar = <TGApp.Sqlite.Character.AppData>{
|
const defaultAvatar = <TGApp.Sqlite.Character.AppData>{
|
||||||
birthday: "",
|
birthday: "",
|
||||||
element: "",
|
element: "",
|
||||||
id: props.modelValue.item,
|
id: props.modelValue.Item,
|
||||||
name: "旅行者",
|
name: "旅行者",
|
||||||
nameCard: "",
|
nameCard: "",
|
||||||
star: 5,
|
star: 5,
|
||||||
@@ -38,7 +38,7 @@ const box = computed<TItemBoxData>(() => {
|
|||||||
icon: `/WIKI/character/icon/${avatar.value?.id}.webp`,
|
icon: `/WIKI/character/icon/${avatar.value?.id}.webp`,
|
||||||
innerHeight: 20,
|
innerHeight: 20,
|
||||||
// 0.24688451 => 24.688%
|
// 0.24688451 => 24.688%
|
||||||
innerText: (props.modelValue.rate * 100).toFixed(3) + "%",
|
innerText: (props.modelValue.Rate * 100).toFixed(3) + "%",
|
||||||
lt:
|
lt:
|
||||||
avatar.value.element !== ""
|
avatar.value.element !== ""
|
||||||
? `/icon/element/${avatar.value.element}元素.webp`
|
? `/icon/element/${avatar.value.element}元素.webp`
|
||||||
@@ -52,9 +52,9 @@ const box = computed<TItemBoxData>(() => {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 如果是 10000005或 10000007,就是主角
|
// 如果是 10000005或 10000007,就是主角
|
||||||
if (props.modelValue.item === 10000005 || props.modelValue.item === 10000007) {
|
if (props.modelValue.Item === 10000005 || props.modelValue.Item === 10000007) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
avatar.value = await TGSqlite.getAppCharacter(props.modelValue.item);
|
avatar.value = await TGSqlite.getAppCharacter(props.modelValue.Item);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function getUpdated(): string {
|
function getUpdated(): string {
|
||||||
return new Date(overview.value.timestamp)
|
return new Date(overview.value.Timestamp)
|
||||||
.toLocaleString("zh-CN", { hour12: false })
|
.toLocaleString("zh-CN", { hour12: false })
|
||||||
.replace(/\//g, "-");
|
.replace(/\//g, "-");
|
||||||
}
|
}
|
||||||
@@ -90,15 +90,15 @@ function getUpdated(): string {
|
|||||||
function getShareTitle(): string {
|
function getShareTitle(): string {
|
||||||
switch (tab.value) {
|
switch (tab.value) {
|
||||||
case "use":
|
case "use":
|
||||||
return `【胡桃】${overview.value.scheduleId}-角色使用`;
|
return `【胡桃】${overview.value.ScheduleId}-角色使用`;
|
||||||
case "up":
|
case "up":
|
||||||
return `【胡桃】${overview.value.scheduleId}-角色出场`;
|
return `【胡桃】${overview.value.ScheduleId}-角色出场`;
|
||||||
case "team":
|
case "team":
|
||||||
return `【胡桃】${overview.value.scheduleId}-队伍出场`;
|
return `【胡桃】${overview.value.ScheduleId}-队伍出场`;
|
||||||
case "hold":
|
case "hold":
|
||||||
return `【胡桃】${overview.value.scheduleId}-角色持有`;
|
return `【胡桃】${overview.value.ScheduleId}-角色持有`;
|
||||||
}
|
}
|
||||||
return `【胡桃】${overview.value.scheduleId}-深渊数据`;
|
return `【胡桃】${overview.value.ScheduleId}-深渊数据`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function shareWiki(): Promise<void> {
|
async function shareWiki(): Promise<void> {
|
||||||
|
|||||||
288
src/plugins/Hutao/types/Abyss.d.ts
vendored
288
src/plugins/Hutao/types/Abyss.d.ts
vendored
@@ -18,81 +18,81 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
* @since Alpha v0.2.1
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.postData
|
* @see HutaoRequest.Abyss.postData
|
||||||
* @interface RecordUpload
|
* @interface RecordUpload
|
||||||
* @property {string} uid - UID
|
* @property {string} Uid - UID
|
||||||
* @property {string} identity - 身份标识
|
* @property {string} Identity - 身份标识
|
||||||
* @property {RecordData} spiralAbyss - 深渊记录
|
* @property {RecordData} SpiralAbyss - 深渊记录
|
||||||
* @property {Avatar[]} avatars - 角色信息
|
* @property {Avatar[]} Avatars - 角色信息
|
||||||
* @property {string} reservedUserName - 保留用户名
|
* @property {string} ReservedUserName - 保留用户名
|
||||||
* @return RecordUpload
|
* @return RecordUpload
|
||||||
*/
|
*/
|
||||||
export interface RecordUpload {
|
export interface RecordUpload {
|
||||||
uid: string;
|
Uid: string;
|
||||||
identity: string;
|
Identity: string;
|
||||||
spiralAbyss: RecordData;
|
SpiralAbyss: RecordData;
|
||||||
avatars: Avatar[];
|
Avatars: Avatar[];
|
||||||
reservedUserName: string;
|
ReservedUserName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 深渊记录
|
* @description 深渊记录
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface RecordData
|
* @interface RecordData
|
||||||
* @property {number} scheduleId - 深渊期数
|
* @property {number} ScheduleId - 深渊期数
|
||||||
* @property {number} totalBattleTimes - 总战斗次数
|
* @property {number} TotalBattleTimes - 总战斗次数
|
||||||
* @property {number} totalWinTimes - 总胜利次数
|
* @property {number} TotalWinTimes - 总胜利次数
|
||||||
* @property {number} damage.avatarId - 最大伤害角色ID
|
* @property {number} Damage.AvatarId - 最大伤害角色ID
|
||||||
* @property {number} damage.value - 最大伤害
|
* @property {number} Damage.Value - 最大伤害
|
||||||
* @property {number} takeDamage.avatarId - 最大承伤角色ID
|
* @property {number} TakeDamage.AvatarId - 最大承伤角色ID
|
||||||
* @property {number} takeDamage.value - 最大承伤
|
* @property {number} TakeDamage.Value - 最大承伤
|
||||||
* @property {Floor[]} floors - 楼层信息
|
* @property {Floor[]} Floors - 楼层信息
|
||||||
* @return RecordData
|
* @return RecordData
|
||||||
*/
|
*/
|
||||||
export interface RecordData {
|
export interface RecordData {
|
||||||
scheduleId: number;
|
ScheduleId: number;
|
||||||
totalBattleTimes: number;
|
TotalBattleTimes: number;
|
||||||
totalWinTimes: number;
|
TotalWinTimes: number;
|
||||||
damage: {
|
Damage: {
|
||||||
avatarId: number;
|
AvatarId: number;
|
||||||
value: number;
|
Value: number;
|
||||||
};
|
};
|
||||||
takeDamage: {
|
TakeDamage: {
|
||||||
avatarId: number;
|
AvatarId: number;
|
||||||
value: number;
|
Value: number;
|
||||||
};
|
};
|
||||||
floors: Floor[];
|
Floors: Floor[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 深渊楼层信息
|
* @description 深渊楼层信息
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface Floor
|
* @interface Floor
|
||||||
* @property {number} index - 楼层索引
|
* @property {number} Index - 楼层索引
|
||||||
* @property {number} star - 楼层星数
|
* @property {number} Star - 楼层星数
|
||||||
* @property {Level[]} levels - 楼层关卡信息
|
* @property {Level[]} Levels - 楼层关卡信息
|
||||||
* @return Floor
|
* @return Floor
|
||||||
*/
|
*/
|
||||||
export interface Floor {
|
export interface Floor {
|
||||||
index: number;
|
Index: number;
|
||||||
star: number;
|
Star: number;
|
||||||
levels: Level[];
|
Levels: Level[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 深渊房间信息
|
* @description 深渊房间信息
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface Level
|
* @interface Level
|
||||||
* @property {number} index - 关卡索引
|
* @property {number} Index - 关卡索引
|
||||||
* @property {number} star - 关卡星数
|
* @property {number} Star - 关卡星数
|
||||||
* @property {number} battles[].index - 战斗索引
|
* @property {number} Battles[].Index - 战斗索引
|
||||||
* @property {number[]} battles[].avatars - 战斗角色ID
|
* @property {number[]} Battles[].Avatars - 战斗角色ID
|
||||||
* @return Level
|
* @return Level
|
||||||
*/
|
*/
|
||||||
export interface Level {
|
export interface Level {
|
||||||
index: number;
|
Index: number;
|
||||||
star: number;
|
Star: number;
|
||||||
battles: Array<{
|
Battles: Array<{
|
||||||
index: number;
|
Index: number;
|
||||||
avatars: number[];
|
Avatars: number[];
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,17 +100,17 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
* @description 角色信息
|
* @description 角色信息
|
||||||
* @since Alpha v0.2.1
|
* @since Alpha v0.2.1
|
||||||
* @interface Avatar
|
* @interface Avatar
|
||||||
* @property {number} avatarId - 角色ID
|
* @property {number} AvatarId - 角色ID
|
||||||
* @property {number} weaponId - 武器ID
|
* @property {number} WeaponId - 武器ID
|
||||||
* @property {number[]} reliquarySetIds - 圣遗物套装ID
|
* @property {number[]} reliquarySetIds - 圣遗物套装ID
|
||||||
* @property {number} activedConstellationNumber - 已激活命座数量
|
* @property {number} activedConstellationNumber - 已激活命座数量
|
||||||
* @return Avatar
|
* @return Avatar
|
||||||
*/
|
*/
|
||||||
export interface Avatar {
|
export interface Avatar {
|
||||||
avatarId: number;
|
AvatarId: number;
|
||||||
weaponId: number;
|
WeaponId: number;
|
||||||
reliquarySetIds: number[];
|
ReliquarySetIds: number[];
|
||||||
activedConstellationNumber: number;
|
ActivedConstellationNumber: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,7 +163,7 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取深渊总览数据返回
|
* @description 获取深渊总览数据返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.getOverview
|
* @see HutaoRequest.Abyss.getOverview
|
||||||
* @interface OverviewResponse
|
* @interface OverviewResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -176,36 +176,36 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 深渊总览数据
|
* @description 深渊总览数据
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface OverviewData
|
* @interface OverviewData
|
||||||
* @property {number} scheduleId - 深渊期数
|
* @property {number} ScheduleId - 深渊期数
|
||||||
* @property {number} recordTotal - 总记录数
|
* @property {number} RecordTotal - 总记录数
|
||||||
* @property {number} spiralAbyssTotal - 总计深渊记录
|
* @property {number} SpiralAbyssTotal - 总计深渊记录
|
||||||
* @property {number} spiralAbyssFullStar - 满星深渊记录数
|
* @property {number} SpiralAbyssFullStar - 满星深渊记录数
|
||||||
* @property {number} spiralAbyssPassed - 通关深渊记录数
|
* @property {number} SpiralAbyssPassed - 通关深渊记录数
|
||||||
* @property {number} spiralAbyssStarTotal - 总星数
|
* @property {number} SpiralAbyssStarTotal - 总星数
|
||||||
* @property {number} spiralAbyssBattleTotal - 总战斗次数
|
* @property {number} SpiralAbyssBattleTotal - 总战斗次数
|
||||||
* @property {number} timestamp - 时间戳
|
* @property {number} Timestamp - 时间戳
|
||||||
* @property {number} timeTotal - 总耗时
|
* @property {number} TimeTotal - 总耗时
|
||||||
* @property {number} timeAverage - 平均耗时
|
* @property {number} TimeAverage - 平均耗时
|
||||||
* @return OverviewData
|
* @return OverviewData
|
||||||
*/
|
*/
|
||||||
export interface OverviewData {
|
export interface OverviewData {
|
||||||
scheduleId: number;
|
ScheduleId: number;
|
||||||
recordTotal: number;
|
RecordTotal: number;
|
||||||
spiralAbyssTotal: number;
|
SpiralAbyssTotal: number;
|
||||||
spiralAbyssFullStar: number;
|
SpiralAbyssFullStar: number;
|
||||||
spiralAbyssPassed: number;
|
SpiralAbyssPassed: number;
|
||||||
spiralAbyssStarTotal: number;
|
SpiralAbyssStarTotal: number;
|
||||||
spiralAbyssBattleTotal: number;
|
SpiralAbyssBattleTotal: number;
|
||||||
timestamp: number;
|
Timestamp: number;
|
||||||
timeTotal: number;
|
TimeTotal: number;
|
||||||
timeAverage: number;
|
TimeAverage: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取角色深渊上场率返回
|
* @description 获取角色深渊上场率返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.avatar.getUpRate
|
* @see HutaoRequest.Abyss.avatar.getUpRate
|
||||||
* @interface AvatarUpResponse
|
* @interface AvatarUpResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -220,22 +220,22 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
* @description 角色深渊上场率
|
* @description 角色深渊上场率
|
||||||
* @since Alpha v0.2.1
|
* @since Alpha v0.2.1
|
||||||
* @interface AvatarUp
|
* @interface AvatarUp
|
||||||
* @property {number} floor - 楼层
|
* @property {number} Floor - 楼层
|
||||||
* @property {number} ranks[].item - 角色ID
|
* @property {number} Ranks[].Item - 角色ID
|
||||||
* @property {number} ranks[].rate - 上场率
|
* @property {number} Ranks[].Rate - 上场率
|
||||||
* @return AvatarUp
|
* @return AvatarUp
|
||||||
*/
|
*/
|
||||||
export interface AvatarUp {
|
export interface AvatarUp {
|
||||||
floor: number;
|
Floor: number;
|
||||||
ranks: Array<{
|
Ranks: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取角色深渊使用率返回
|
* @description 获取角色深渊使用率返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.avatar.getUseRate
|
* @see HutaoRequest.Abyss.avatar.getUseRate
|
||||||
* @interface AvatarUseResponse
|
* @interface AvatarUseResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -248,24 +248,24 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 角色深渊使用率
|
* @description 角色深渊使用率
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface AvatarUse
|
* @interface AvatarUse
|
||||||
* @property {number} floor - 楼层
|
* @property {number} Floor - 楼层
|
||||||
* @property {number} ranks[].item - 角色ID
|
* @property {number} Ranks[].Item - 角色ID
|
||||||
* @property {number} ranks[].rate - 使用率
|
* @property {number} Ranks[].Rate - 使用率
|
||||||
* @return AvatarUse
|
* @return AvatarUse
|
||||||
*/
|
*/
|
||||||
export interface AvatarUse {
|
export interface AvatarUse {
|
||||||
floor: number;
|
Floor: number;
|
||||||
ranks: Array<{
|
Ranks: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取角色深渊持有率返回
|
* @description 获取角色深渊持有率返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.avatar.getHoldRate
|
* @see HutaoRequest.Abyss.avatar.getHoldRate
|
||||||
* @interface AvatarHoldResponse
|
* @interface AvatarHoldResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -278,26 +278,26 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 角色深渊持有率
|
* @description 角色深渊持有率
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface AvatarHold
|
* @interface AvatarHold
|
||||||
* @property {number} holdingRate - 持有率
|
* @property {number} HoldingRate - 持有率
|
||||||
* @property {number} constellations[].item - 命座ID
|
* @property {number} Constellations[].Item - 命座ID
|
||||||
* @property {number} constellations[].rate - 持有率
|
* @property {number} Constellations[].Rate - 持有率
|
||||||
* @property {number} avatarId - 角色ID
|
* @property {number} AvatarId - 角色ID
|
||||||
* @return AvatarHold
|
* @return AvatarHold
|
||||||
*/
|
*/
|
||||||
export interface AvatarHold {
|
export interface AvatarHold {
|
||||||
holdingRate: number;
|
HoldingRate: number;
|
||||||
constellations: Array<{
|
Constellations: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
avatarId: number;
|
AvatarId: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取角色的圣遗物、武器搭配
|
* @description 获取角色的圣遗物、武器搭配
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.avatar.getCollect
|
* @see HutaoRequest.Abyss.avatar.getCollect
|
||||||
* @interface AvatarCollocationResponse
|
* @interface AvatarCollocationResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -310,36 +310,36 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 角色搭配
|
* @description 角色搭配
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface AvatarCollocation
|
* @interface AvatarCollocation
|
||||||
* @property {number} avatarId - 角色ID
|
* @property {number} AvatarId - 角色ID
|
||||||
* @property {number} avatars[].item - 角色ID
|
* @property {number} Avatars[].Item - 角色ID
|
||||||
* @property {number} avatars[].rate - 角色搭配率
|
* @property {number} Avatars[].Rate - 角色搭配率
|
||||||
* @property {string} reliquaries[].item - 圣遗物套装ID // id-num,id-num
|
* @property {string} Reliquaries[].Item - 圣遗物套装ID // id-num,id-num
|
||||||
* @property {number} reliquaries[].rate - 圣遗物套装搭配率
|
* @property {number} Reliquaries[].Rate - 圣遗物套装搭配率
|
||||||
* @property {number} weapons[].item - 武器ID
|
* @property {number} Weapons[].Item - 武器ID
|
||||||
* @property {number} weapons[].rate - 武器搭配率
|
* @property {number} Weapons[].Rate - 武器搭配率
|
||||||
* @return AvatarCollocation
|
* @return AvatarCollocation
|
||||||
*/
|
*/
|
||||||
export interface AvatarCollocation {
|
export interface AvatarCollocation {
|
||||||
avatarId: number;
|
AvatarId: number;
|
||||||
avatars: Array<{
|
Avatars: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
reliquaries: Array<{
|
Reliquaries: Array<{
|
||||||
item: string;
|
Item: string;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
weapons: Array<{
|
Weapons: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取武器搭配角色返回
|
* @description 获取武器搭配角色返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.weapon.getCollect
|
* @see HutaoRequest.Abyss.weapon.getCollect
|
||||||
* @interface WeaponCollocationResponse
|
* @interface WeaponCollocationResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -351,24 +351,24 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 武器搭配角色
|
* @description 武器搭配角色
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface WeaponCollocation
|
* @interface WeaponCollocation
|
||||||
* @property {number} weaponId - 武器ID
|
* @property {number} WeaponId - 武器ID
|
||||||
* @property {number} avatars[].item - 角色ID
|
* @property {number} Avatars[].Item - 角色ID
|
||||||
* @property {number} avatars[].rate - 角色搭配率
|
* @property {number} Avatars[].Rate - 角色搭配率
|
||||||
* @return WeaponCollocation
|
* @return WeaponCollocation
|
||||||
*/
|
*/
|
||||||
export interface WeaponCollocation {
|
export interface WeaponCollocation {
|
||||||
weaponId: number;
|
WeaponId: number;
|
||||||
avatars: Array<{
|
Avatars: Array<{
|
||||||
item: number;
|
Item: number;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取队伍搭配返回
|
* @description 获取队伍搭配返回
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @see HutaoRequest.Abyss.getTeamCollect
|
* @see HutaoRequest.Abyss.getTeamCollect
|
||||||
* @interface TeamCombinationResponse
|
* @interface TeamCombinationResponse
|
||||||
* @extends TGApp.Plugins.Hutao.Base.Response
|
* @extends TGApp.Plugins.Hutao.Base.Response
|
||||||
@@ -381,24 +381,24 @@ declare namespace TGApp.Plugins.Hutao.Abyss {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 队伍搭配
|
* @description 队伍搭配
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.2.1
|
||||||
* @interface TeamCombination
|
* @interface TeamCombination
|
||||||
* @property {number} floor - 楼层
|
* @property {number} Floor - 楼层
|
||||||
* @property {string} up[].item - 角色ID // id,id,id,id
|
* @property {string} Up[].Item - 角色ID // id,id,id,id
|
||||||
* @property {number} up[].rate - 统计次数
|
* @property {number} Up[].Rate - 统计次数
|
||||||
* @property {string} down[].item - 角色ID // id,id,id,id
|
* @property {string} Down[].Item - 角色ID // id,id,id,id
|
||||||
* @property {number} down[].rate - 统计次数
|
* @property {number} Down[].Rate - 统计次数
|
||||||
* @return TeamCombination
|
* @return TeamCombination
|
||||||
*/
|
*/
|
||||||
export interface TeamCombination {
|
export interface TeamCombination {
|
||||||
floor: number;
|
Floor: number;
|
||||||
up: Array<{
|
Up: Array<{
|
||||||
item: string;
|
Item: string;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
down: Array<{
|
Down: Array<{
|
||||||
item: string;
|
Item: string;
|
||||||
rate: number;
|
Rate: number;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ export function transLocal(
|
|||||||
data: TGApp.Sqlite.Abyss.SingleTable,
|
data: TGApp.Sqlite.Abyss.SingleTable,
|
||||||
): TGApp.Plugins.Hutao.Abyss.RecordUpload {
|
): TGApp.Plugins.Hutao.Abyss.RecordUpload {
|
||||||
return {
|
return {
|
||||||
uid: data.uid,
|
Uid: data.uid,
|
||||||
identity: "Tauri.Genshin",
|
Identity: "Tauri.Genshin",
|
||||||
spiralAbyss: transAbyss(data),
|
SpiralAbyss: transAbyss(data),
|
||||||
avatars: [],
|
Avatars: [],
|
||||||
reservedUserName: "",
|
ReservedUserName: "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,18 +33,18 @@ function transAbyss(data: TGApp.Sqlite.Abyss.SingleTable): TGApp.Plugins.Hutao.A
|
|||||||
const damage: TGApp.Sqlite.Abyss.Character = JSON.parse(data.damageRank)[0];
|
const damage: TGApp.Sqlite.Abyss.Character = JSON.parse(data.damageRank)[0];
|
||||||
const takeDamage: TGApp.Sqlite.Abyss.Character = JSON.parse(data.takeDamageRank)[0];
|
const takeDamage: TGApp.Sqlite.Abyss.Character = JSON.parse(data.takeDamageRank)[0];
|
||||||
return {
|
return {
|
||||||
scheduleId: data.id,
|
ScheduleId: data.id,
|
||||||
totalBattleTimes: data.totalBattleTimes,
|
TotalBattleTimes: data.totalBattleTimes,
|
||||||
totalWinTimes: data.totalWinTimes,
|
TotalWinTimes: data.totalWinTimes,
|
||||||
damage: {
|
Damage: {
|
||||||
avatarId: damage.id,
|
AvatarId: damage.id,
|
||||||
value: damage.value,
|
Value: damage.value,
|
||||||
},
|
},
|
||||||
takeDamage: {
|
TakeDamage: {
|
||||||
avatarId: takeDamage.id,
|
AvatarId: takeDamage.id,
|
||||||
value: takeDamage.value,
|
Value: takeDamage.value,
|
||||||
},
|
},
|
||||||
floors: JSON.parse(data.floors).map((floor: TGApp.Sqlite.Abyss.Floor) => transFloor(floor)),
|
Floors: JSON.parse(data.floors).map((floor: TGApp.Sqlite.Abyss.Floor) => transFloor(floor)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,9 +56,9 @@ function transAbyss(data: TGApp.Sqlite.Abyss.SingleTable): TGApp.Plugins.Hutao.A
|
|||||||
*/
|
*/
|
||||||
function transFloor(data: TGApp.Sqlite.Abyss.Floor): TGApp.Plugins.Hutao.Abyss.Floor {
|
function transFloor(data: TGApp.Sqlite.Abyss.Floor): TGApp.Plugins.Hutao.Abyss.Floor {
|
||||||
return {
|
return {
|
||||||
index: data.id,
|
Index: data.id,
|
||||||
star: data.winStar,
|
Star: data.winStar,
|
||||||
levels: data.levels.map((level) => transLevel(level)),
|
Levels: data.levels.map((level) => transLevel(level)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,19 +69,19 @@ function transFloor(data: TGApp.Sqlite.Abyss.Floor): TGApp.Plugins.Hutao.Abyss.F
|
|||||||
* @returns {TGApp.Plugins.Hutao.Abyss.Level} 上传用的数据
|
* @returns {TGApp.Plugins.Hutao.Abyss.Level} 上传用的数据
|
||||||
*/
|
*/
|
||||||
function transLevel(data: TGApp.Sqlite.Abyss.Level): TGApp.Plugins.Hutao.Abyss.Level {
|
function transLevel(data: TGApp.Sqlite.Abyss.Level): TGApp.Plugins.Hutao.Abyss.Level {
|
||||||
const battles: Array<{ index: number; avatars: number[] }> = [];
|
const battles: Array<{ Index: number; Avatars: number[] }> = [];
|
||||||
battles.push({
|
battles.push({
|
||||||
index: 1,
|
Index: 1,
|
||||||
avatars: data.upBattle.characters.map((character) => character.id),
|
Avatars: data.upBattle.characters.map((character) => character.id),
|
||||||
});
|
});
|
||||||
battles.push({
|
battles.push({
|
||||||
index: 2,
|
Index: 2,
|
||||||
avatars: data.downBattle.characters.map((character) => character.id),
|
Avatars: data.downBattle.characters.map((character) => character.id),
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
index: data.id,
|
Index: data.id,
|
||||||
star: data.winStar,
|
Star: data.winStar,
|
||||||
battles,
|
Battles: battles,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,10 +104,10 @@ export function transAvatars(
|
|||||||
relics = relicSet.map((relic) => relic.set.id);
|
relics = relicSet.map((relic) => relic.set.id);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
avatarId: avatar.cid,
|
AvatarId: avatar.cid,
|
||||||
weaponId: weapon.id,
|
WeaponId: weapon.id,
|
||||||
reliquarySetIds: relics,
|
ReliquarySetIds: relics,
|
||||||
activedConstellationNumber: avatar.activeConstellation,
|
ActivedConstellationNumber: avatar.activeConstellation,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user