Commit 1ae79d33 authored by liwei's avatar liwei

Merge remote-tracking branch 'origin/master'

parents 67e7d0aa fbd93475
......@@ -93,6 +93,7 @@
</template>
<script lang="ts" setup>
import {handleGetAIToken} from '../AIStation/AItoken.js'
import { ref, reactive, onMounted, onUnmounted,computed,watch,onBeforeUnmount } from 'vue'
import store from "../../store/index";
import http from "../../api/http";
......@@ -832,14 +833,15 @@ const route = useRoute()
var timerQuery;
watch(
() => route.path, // 只监听路径变化
() => {
if(route.path === '/Remote/OnekeyStartStop') {
async () => {
if (route.path === '/Remote/OnekeyStartStop') {
getSupplys();
timerQuery = setInterval(() => {
timerQuery = setInterval(async () => {
await handleGetAIToken()
// 查询启停进度
getSteps()
}, 1000); // 每秒调用一次
}else {
} else {
// 清理定时任务
clearInterval(timerQuery);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment