mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
BIN
public/WIKI/character/10000110.webp
Normal file
BIN
public/WIKI/character/10000110.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
public/WIKI/character/10000111.webp
Normal file
BIN
public/WIKI/character/10000111.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
public/WIKI/weapon/14519.webp
Normal file
BIN
public/WIKI/weapon/14519.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -4,7 +4,7 @@
|
||||
<TMiImg :ori="true" :src="data.bg" alt="bg" />
|
||||
</div>
|
||||
<div class="tur-ws-icon">
|
||||
<img :src="icon" alt="icon" />
|
||||
<TMiImg :src="icon" :ori="true" alt="icon" />
|
||||
</div>
|
||||
<div class="tur-ws-content">
|
||||
<div class="tur-ws-title">
|
||||
@@ -54,13 +54,12 @@ const { theme } = storeToRefs(useAppStore());
|
||||
const props = defineProps<TurWorldSubProps>();
|
||||
|
||||
const imgFilter = computed<string>(() => {
|
||||
if (props.data.name !== "纳塔") return "none";
|
||||
if (theme.value === "dark") return "none";
|
||||
return "invert(0.75)";
|
||||
});
|
||||
const icon = computed<string>(() => {
|
||||
if (theme.value === "dark") return props.data.iconLight;
|
||||
return props.data.iconDark;
|
||||
if (props.data.icon) return props.data.icon;
|
||||
return props.data.iconLight;
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -85,7 +85,8 @@ import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import TakumiRecordGenshinApi from "@/web/request/recordReq.js";
|
||||
|
||||
const { account, cookie } = storeToRefs(useUserStore());
|
||||
const userStore = useUserStore();
|
||||
const { account, cookie } = storeToRefs(userStore);
|
||||
const uidCur = ref<number>();
|
||||
const version = ref<string>();
|
||||
const uidList = shallowRef<Array<number>>([]);
|
||||
@@ -129,7 +130,7 @@ async function refreshRecord(): Promise<void> {
|
||||
`确认则尝试切换至${uidCur.value}`,
|
||||
);
|
||||
if (switchCheck) {
|
||||
await useUserStore().switchGameAccount(uidCur.value.toString());
|
||||
await userStore.switchGameAccount(uidCur.value.toString());
|
||||
await refreshRecord();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Sqlite/utils/transUserRecord.ts
|
||||
* @description Sqlite 数据转换 用户战绩数据转换模块
|
||||
* @since Beta v0.6.0
|
||||
* @since Beta v0.7.2
|
||||
*/
|
||||
|
||||
import { getZhElement } from "@/utils/toolFunc.js";
|
||||
@@ -94,7 +94,7 @@ function transStat(data: TGApp.Game.Record.Stats): TGApp.Sqlite.Record.Stats {
|
||||
|
||||
/**
|
||||
* @description 将探索信息转换为数据库中的数据
|
||||
* @since Beta v0.5.5
|
||||
* @since Beta v0.7.2
|
||||
* @param {TGApp.Game.Record.WorldExplore[]} data 城市探索信息
|
||||
* @returns {TGApp.Sqlite.Record.WorldExplore[]} 转换后的城市探索信息
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ function transWorld(data: TGApp.Game.Record.WorldExplore[]): TGApp.Sqlite.Record
|
||||
id: area.id,
|
||||
name: area.name,
|
||||
iconLight: area.icon,
|
||||
iconDark: area.inner_icon,
|
||||
icon: area.icon,
|
||||
bg: area.background_image,
|
||||
cover: area.cover,
|
||||
exploration: area.exploration_percentage,
|
||||
@@ -124,12 +124,18 @@ function transWorld(data: TGApp.Game.Record.WorldExplore[]): TGApp.Sqlite.Record
|
||||
}
|
||||
// 对纳塔的特殊处理
|
||||
if (area.name === "纳塔") {
|
||||
world.iconLight =
|
||||
"https://webstatic.mihoyo.com/app/community-game-records/images/world-logo-15.fd274778.png";
|
||||
world.iconDark =
|
||||
world.icon =
|
||||
"https://webstatic.mihoyo.com/app/community-game-records/images/world-logo-15.fd274778.png";
|
||||
world.iconLight = world.icon;
|
||||
world.bg =
|
||||
"https://fastcdn.mihoyo.com/static-resource-v2/2024/08/19/8856eafed39be791276a21a6d522426b_6903333123294722705.png";
|
||||
// 对远古圣山的特殊处理
|
||||
} else if (area.name === "远古圣山") {
|
||||
world.icon =
|
||||
"https://webstatic.mihoyo.com/app/community-game-records/images/world-logo-16.1c751ac9.png";
|
||||
world.iconLight = world.icon;
|
||||
world.bg =
|
||||
"https://fastcdn.mihoyo.com/static-resource-v2/2025/03/17/8ee1648101a8b292ffb37eb49559032e_6583057448168798147.png";
|
||||
}
|
||||
const children = areaChild.filter((i) => i.parent_id === area.id);
|
||||
for (const child of children) {
|
||||
|
||||
56
src/types/Sqlite/Record.d.ts
vendored
56
src/types/Sqlite/Record.d.ts
vendored
@@ -1,15 +1,9 @@
|
||||
/**
|
||||
* @file types/Sqlite/Record.d.ts
|
||||
* @description Sqlite 原神战绩相关类型定义文件
|
||||
* @since Beta v0.6.0
|
||||
* @since Beta v0.7.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Sqlite 原神战绩相关类型定义命名空间
|
||||
* @since Beta v0.6.0
|
||||
* @namespace Record
|
||||
* @memberof TGApp.Sqlite
|
||||
*/
|
||||
declare namespace TGApp.Sqlite.Record {
|
||||
/**
|
||||
* @description 原神战绩数据表
|
||||
@@ -24,7 +18,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {string} updated - 更新时间
|
||||
* @return SingleTable
|
||||
*/
|
||||
interface SingleTable {
|
||||
type SingleTable = {
|
||||
uid: number;
|
||||
role: string;
|
||||
avatars: string;
|
||||
@@ -32,7 +26,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
worldExplore: string;
|
||||
homes: string;
|
||||
updated: string;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 渲染用数据
|
||||
@@ -47,7 +41,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {string} updated - 更新时间
|
||||
* @returns RenderData
|
||||
*/
|
||||
interface RenderData {
|
||||
type RenderData = {
|
||||
uid: number;
|
||||
role: Role;
|
||||
avatars: Avatar[];
|
||||
@@ -55,7 +49,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
worldExplore: WorldExplore[];
|
||||
homes: Home[];
|
||||
updated: string;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 角色信息类型
|
||||
@@ -67,12 +61,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {string} avatar - 头像
|
||||
* @return Role
|
||||
*/
|
||||
interface Role {
|
||||
nickname: string;
|
||||
region: string;
|
||||
level: number;
|
||||
avatar: string;
|
||||
}
|
||||
type Role = { nickname: string; region: string; level: number; avatar: string };
|
||||
|
||||
/**
|
||||
* @description 角色列表类型
|
||||
@@ -88,7 +77,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {boolean} isShow - 角色是否展示
|
||||
* @return Avatar
|
||||
*/
|
||||
interface Avatar {
|
||||
type Avatar = {
|
||||
id: number;
|
||||
name: string;
|
||||
element: string;
|
||||
@@ -97,7 +86,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
star: number;
|
||||
constellation: number;
|
||||
isShow: 0 | 1;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 统计信息类型
|
||||
@@ -124,7 +113,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {number} magicChest - 奇馈宝箱数
|
||||
* @return Stats
|
||||
*/
|
||||
interface Stats {
|
||||
type Stats = {
|
||||
activeDays: number;
|
||||
achievementNumber: number;
|
||||
avatarNumber: number;
|
||||
@@ -144,16 +133,15 @@ declare namespace TGApp.Sqlite.Record {
|
||||
exquisiteChest: number;
|
||||
commonChest: number;
|
||||
magicChest: number;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 世界探索信息类型
|
||||
* @interface WorldExplore
|
||||
* @since Beta v0.4.3
|
||||
* @since Beta v0.7.2
|
||||
* @property {number} id - 地区 ID
|
||||
* @property {string} name - 地区名称
|
||||
* @property {string} iconLight - 地区图标(亮)
|
||||
* @property {string} iconDark - 地区图标(暗)
|
||||
* @property {string} bg - 背景
|
||||
* @property {string} cover - 封面
|
||||
* @property {number} reputation - 地区声望等级
|
||||
@@ -162,18 +150,18 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {WorldChild[]} children - 子地区
|
||||
* @return WorldExplore
|
||||
*/
|
||||
interface WorldExplore {
|
||||
type WorldExplore = {
|
||||
id: number;
|
||||
name: string;
|
||||
iconLight: string;
|
||||
iconDark: string;
|
||||
icon?: string;
|
||||
bg: string;
|
||||
cover: string;
|
||||
reputation?: number;
|
||||
offering?: WorldOffering;
|
||||
exploration: number;
|
||||
children: WorldChild[];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 祭祀物类型
|
||||
@@ -184,11 +172,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {string} icon - 图标
|
||||
* @return WorldOffering
|
||||
*/
|
||||
interface WorldOffering {
|
||||
name: string;
|
||||
level: number;
|
||||
icon: string;
|
||||
}
|
||||
type WorldOffering = { name: string; level: number; icon: string };
|
||||
|
||||
/**
|
||||
* @description 子地区类型
|
||||
@@ -199,11 +183,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {number} exploration - 子地区探索进度
|
||||
* @return WorldChild
|
||||
*/
|
||||
interface WorldChild {
|
||||
id: number;
|
||||
name: string;
|
||||
exploration: number;
|
||||
}
|
||||
type WorldChild = { id: number; name: string; exploration: number };
|
||||
|
||||
/**
|
||||
* @description 尘歌壶信息类型
|
||||
@@ -219,7 +199,7 @@ declare namespace TGApp.Sqlite.Record {
|
||||
* @property {string} bg - 背景
|
||||
* @return Home
|
||||
*/
|
||||
interface Home {
|
||||
type Home = {
|
||||
comfortIcon: string;
|
||||
comfortName: string;
|
||||
name: string;
|
||||
@@ -228,5 +208,5 @@ declare namespace TGApp.Sqlite.Record {
|
||||
furniture: number;
|
||||
visit: number;
|
||||
bg: string;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user