mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
🚸 本地无数据时跳转到外部
This commit is contained in:
@@ -31,6 +31,7 @@ import recordReq from "@req/recordReq.js";
|
|||||||
import takumiReq from "@req/takumiReq.js";
|
import takumiReq from "@req/takumiReq.js";
|
||||||
import useAppStore from "@store/app.js";
|
import useAppStore from "@store/app.js";
|
||||||
import useUserStore from "@store/user.js";
|
import useUserStore from "@store/user.js";
|
||||||
|
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||||
import TGLogger from "@utils/TGLogger.js";
|
import TGLogger from "@utils/TGLogger.js";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { onMounted, shallowRef, ref, watch } from "vue";
|
import { onMounted, shallowRef, ref, watch } from "vue";
|
||||||
@@ -100,16 +101,14 @@ async function loadWikiPosition(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMaterial(cur: TGApp.Game.ActCalendar.ActReward): void {
|
async function handleMaterial(cur: TGApp.Game.ActCalendar.ActReward): Promise<void> {
|
||||||
console.log("handleMaterial", cur);
|
|
||||||
const find = WikiMaterialData.find((i) => i.id === cur.item_id);
|
const find = WikiMaterialData.find((i) => i.id === cur.item_id);
|
||||||
if (!find) {
|
if (!find) {
|
||||||
showSnackbar.warn(`未找到${cur.name}的百科信息`);
|
await openUrl(cur.wiki_url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
curMaterial.value = find;
|
curMaterial.value = find;
|
||||||
showMaterial.value = true;
|
showMaterial.value = true;
|
||||||
console.log(showMaterial.value);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ async function toAbyss(): Promise<void> {
|
|||||||
|
|
||||||
function showMaterial(reward: TGApp.Game.ActCalendar.ActReward): void {
|
function showMaterial(reward: TGApp.Game.ActCalendar.ActReward): void {
|
||||||
emits("clickM", reward);
|
emits("clickM", reward);
|
||||||
console.log("showMaterial", reward);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user