mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-16 09:58:13 +08:00
♻️ Mys 类型重构,优化目录结构
This commit is contained in:
@@ -14,7 +14,8 @@ import TibWikiAvatar from "../../components/itembox/tib-wiki-avatar.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppCharacterData } from "../../data";
|
||||
import { OBC_CONTENT_API } from "../../plugins/Mys/interface/utils";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
|
||||
// snackbar
|
||||
const snackbar = ref(false);
|
||||
@@ -26,7 +27,7 @@ function toOuter(item: TGApp.App.Character.WikiBriefInfo) {
|
||||
snackbar.value = true;
|
||||
return;
|
||||
}
|
||||
const url = OBC_CONTENT_API.replace("{content_id}", item.contentId.toString());
|
||||
const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString());
|
||||
createTGWindow(url, "角色详情", item.name, 1200, 800, true);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -110,23 +110,23 @@ import TOLoading from "../../components/overlay/to-loading.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppGCGData } from "../../data";
|
||||
// interface
|
||||
import { OBC_CONTENT_API } from "../../plugins/Mys/interface/utils";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
|
||||
// loading
|
||||
const loading = ref(true);
|
||||
const loading = ref<boolean>(true);
|
||||
const allCards = computed(() => AppGCGData);
|
||||
// snackbar
|
||||
const snackbar = ref(false);
|
||||
const snackbar = ref<boolean>(false);
|
||||
// search
|
||||
const doSearch = ref(false);
|
||||
const search = ref("");
|
||||
const doSearch = ref<boolean>(false);
|
||||
const search = ref<string>("");
|
||||
// data
|
||||
const tab = ref("character");
|
||||
const CardsInfoC = ref([] as TGApp.App.GCG.WikiBriefInfo[]);
|
||||
const CardsInfoA = ref([] as TGApp.App.GCG.WikiBriefInfo[]);
|
||||
const CardsInfoM = ref([] as TGApp.App.GCG.WikiBriefInfo[]);
|
||||
const CardsInfoS = ref([] as TGApp.App.GCG.WikiBriefInfo[]);
|
||||
const tab = ref<string>("character");
|
||||
const CardsInfoC = ref<TGApp.App.GCG.WikiBriefInfo[]>([]);
|
||||
const CardsInfoA = ref<TGApp.App.GCG.WikiBriefInfo[]>([]);
|
||||
const CardsInfoM = ref<TGApp.App.GCG.WikiBriefInfo[]>([]);
|
||||
const CardsInfoS = ref<TGApp.App.GCG.WikiBriefInfo[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
await loadData();
|
||||
@@ -144,7 +144,7 @@ async function loadData() {
|
||||
}
|
||||
|
||||
function toOuter(cardName: string, cardId: number) {
|
||||
const url = OBC_CONTENT_API.replace("{content_id}", cardId.toString());
|
||||
const url = Mys.Api.Obc.replace("{contentId}", cardId.toString());
|
||||
createTGWindow(url, "GCG", cardName, 1200, 800, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ import TibWikiWeapon from "../../components/itembox/tib-wiki-weapon.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppWeaponData } from "../../data";
|
||||
import { OBC_CONTENT_API } from "../../plugins/Mys/interface/utils";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
|
||||
// snackbar
|
||||
const snackbar = ref(false);
|
||||
const snackbar = ref<boolean>(false);
|
||||
// data
|
||||
const cardsInfo = computed(() => AppWeaponData);
|
||||
|
||||
@@ -26,7 +27,7 @@ function toOuter(item: TGApp.App.Weapon.WikiBriefInfo) {
|
||||
snackbar.value = true;
|
||||
return;
|
||||
}
|
||||
const url = OBC_CONTENT_API.replace("{content_id}", item.contentId.toString());
|
||||
const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString());
|
||||
createTGWindow(url, "武器详情", item.name, 1200, 800, true);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user