mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🐛 修复 Qodana 报错
This commit is contained in:
@@ -21,9 +21,9 @@ import { appWindow } from "@tauri-apps/api/window";
|
||||
import TGRequest from "../web/request/TGRequest";
|
||||
|
||||
// loading
|
||||
const loading = ref(true as boolean);
|
||||
const loadingTitle = ref("正在加载");
|
||||
const loadingEmpty = ref(false as boolean);
|
||||
const loading = ref<boolean>(true);
|
||||
const loadingTitle = ref<string>("正在加载");
|
||||
const loadingEmpty = ref<boolean>(false);
|
||||
|
||||
// 数据
|
||||
const annoId = Number(useRoute().params.anno_id);
|
||||
|
||||
@@ -78,7 +78,7 @@ const lotteryTimer = ref<any>(null);
|
||||
// 参与方式
|
||||
const participationMethod = ref<string>("未知");
|
||||
|
||||
function flushTimeStatus() {
|
||||
function flushTimeStatus(): void {
|
||||
const timeNow = new Date().getTime();
|
||||
const timeDiff = Number(jsonData.draw_time) * 1000 - timeNow;
|
||||
if (timeDiff <= 0) {
|
||||
@@ -94,16 +94,14 @@ function flushTimeStatus() {
|
||||
}
|
||||
|
||||
// 数据
|
||||
const lotteryId = useRoute().params.lottery_id as string;
|
||||
const lotteryId = <string>useRoute().params.lottery_id;
|
||||
const lotteryCard = ref<TGApp.Plugins.Mys.Lottery.RenderCard>(
|
||||
{} as TGApp.Plugins.Mys.Lottery.RenderCard,
|
||||
);
|
||||
let jsonData = reactive<TGApp.Plugins.Mys.Lottery.FullData>(
|
||||
{} as TGApp.Plugins.Mys.Lottery.FullData,
|
||||
<TGApp.Plugins.Mys.Lottery.RenderCard>{},
|
||||
);
|
||||
let jsonData = reactive<TGApp.Plugins.Mys.Lottery.FullData>(<TGApp.Plugins.Mys.Lottery.FullData>{});
|
||||
const timeStatus = ref<string>("未知");
|
||||
|
||||
function backPost() {
|
||||
function backPost(): void {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
@@ -140,7 +138,7 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
// 获取参与方式
|
||||
function getUpWay(upWay: string) {
|
||||
function getUpWay(upWay: string): string {
|
||||
switch (upWay) {
|
||||
case "Forward":
|
||||
return "转发";
|
||||
|
||||
Reference in New Issue
Block a user