Commit 1ae79d33 authored by liwei's avatar liwei

Merge remote-tracking branch 'origin/master'

parents 67e7d0aa fbd93475
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {handleGetAIToken} from '../AIStation/AItoken.js'
import { ref, reactive, onMounted, onUnmounted,computed,watch,onBeforeUnmount } from 'vue' import { ref, reactive, onMounted, onUnmounted,computed,watch,onBeforeUnmount } from 'vue'
import store from "../../store/index"; import store from "../../store/index";
import http from "../../api/http"; import http from "../../api/http";
...@@ -832,14 +833,15 @@ const route = useRoute() ...@@ -832,14 +833,15 @@ const route = useRoute()
var timerQuery; var timerQuery;
watch( watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { async () => {
if(route.path === '/Remote/OnekeyStartStop') { if (route.path === '/Remote/OnekeyStartStop') {
getSupplys(); getSupplys();
timerQuery = setInterval(() => { timerQuery = setInterval(async () => {
await handleGetAIToken()
// 查询启停进度 // 查询启停进度
getSteps() getSteps()
}, 1000); // 每秒调用一次 }, 1000); // 每秒调用一次
}else { } else {
// 清理定时任务 // 清理定时任务
clearInterval(timerQuery); 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