|
@@ -4,12 +4,14 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
//import Speech from 'speak-tts';
|
|
|
+import router from '@/router';
|
|
|
const { proxy } = getCurrentInstance() as any;
|
|
|
-proxy?.$http.common.baiduToken({}).then((res: any) => {
|
|
|
- let tok = res.token;
|
|
|
- localStorage.setItem('tok', tok);
|
|
|
-});
|
|
|
-
|
|
|
+if (!['/analysis/index', '/analysis/detail'].includes(router.currentRoute.value.path)) {
|
|
|
+ proxy?.$http.common.baiduToken({}).then((res: any) => {
|
|
|
+ let tok = res.token;
|
|
|
+ localStorage.setItem('tok', tok);
|
|
|
+ });
|
|
|
+}
|
|
|
//let speech = new Speech();
|
|
|
//let state = localStorage.getItem('ttsState');
|
|
|
// if (!speech.hasBrowserSupport()) {
|