diff --git a/public/platforms/mhy/hyg.webp b/public/platforms/mhy/hyg.webp new file mode 100644 index 00000000..0c561d50 Binary files /dev/null and b/public/platforms/mhy/hyg.webp differ diff --git a/src/components/pageConfig/tco-gameLogin.vue b/src/components/pageConfig/tco-gameLogin.vue index bba9a3c9..ac5b1ec9 100644 --- a/src/components/pageConfig/tco-gameLogin.vue +++ b/src/components/pageConfig/tco-gameLogin.vue @@ -65,6 +65,11 @@ const selects: Array = [ // value: 9, // icon: "/platforms/mhy/hna.webp", // }, + // { + // title: "星布谷地", + // value: 10, + // icon: "/platforms/mhy/hyg.webp", + // }, ]; // eslint-disable-next-line no-undef diff --git a/src/components/userScripts/tus-sign.vue b/src/components/userScripts/tus-sign.vue index cc6b36a6..bfc4a975 100644 --- a/src/components/userScripts/tus-sign.vue +++ b/src/components/userScripts/tus-sign.vue @@ -60,6 +60,7 @@ import lunaReq from "@req/lunaReq.js"; import miscReq from "@req/miscReq.js"; import takumiReq from "@req/takumiReq.js"; import TSUserAccount from "@Sqlm/userAccount.js"; +import useBBSStore from "@store/bbs.js"; import useUserStore from "@store/user.js"; import TGLogger from "@utils/TGLogger.js"; import { storeToRefs } from "pinia"; @@ -75,6 +76,8 @@ type SignAccount = { }; const { cookie, uid } = storeToRefs(useUserStore()); +const { gameList } = storeToRefs(useBBSStore()); + const loadScript = defineModel(); const loadState = ref(false); const loadSign = ref(false); @@ -91,31 +94,11 @@ watch( onMounted(async () => await loadData()); function getGameInfo(biz: string): SignGameInfo { - switch (biz) { - // 崩坏2 - case "bh2_cn": - return { title: "崩坏2", icon: "/platforms/mhy/bh2.webp", gid: 3 }; - // 崩坏3 - case "bh3_cn": - return { title: "崩坏3", icon: "/platforms/mhy/bh3.webp", gid: 1 }; - // 原神 - case "hk4e_cn": - return { title: "原神", icon: "/platforms/mhy/ys.webp", gid: 2 }; - // 崩坏:星穹铁道 - case "hkrpg_cn": - return { title: "崩坏:星穹铁道", icon: "/platforms/mhy/sr.webp", gid: 6 }; - // 未定事件簿 - case "nxx_cn": - return { title: "未定事件簿", icon: "/platforms/mhy/wd.webp", gid: 4 }; - // 绝区零 - case "nap_cn": - return { title: "绝区零", icon: "/platforms/mhy/zzz.webp", gid: 8 }; - // 崩坏:因缘精灵 - case "hna_cn": - return { title: "崩坏:因缘精灵", icon: "/platform/s/mhy/hna.webp", gid: 9 }; - default: - return { title: biz, icon: "/platforms/mhy/mys.webp", gid: 0 }; - } + const enName = biz.split("_")[0]; + if (!enName) return { title: biz, icon: "/platforms/mhy/mys.webp", gid: 0 }; + const findGame = gameList.value.find((i) => i.op_name === enName); + if (findGame) return { title: findGame.name, icon: findGame.app_icon, gid: findGame.id }; + return { title: biz, icon: "/platforms/mhy/mys.webp", gid: 0 }; } async function loadData(): Promise {