1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| <template>
| <router-view />
| </template>
|
| <script setup>
| import { loginWithMiniProgramApi } from '@/api/zkxt'
| import { useStore } from 'vuex'
|
| const store = useStore()
| const authToken = window.localStorage?.authToken
|
| store.commit('setXtToken', authToken)
| const { VITE_APP_ENV } = import.meta.env
|
| if (VITE_APP_ENV === 'development') {
| function getXTToken() {
| loginWithMiniProgramApi({ username: '13007280672' }).then(res => {
| store.commit('setXtToken', res.data.data.access_token)
| })
| }
| getXTToken()
| setInterval(getXTToken, 600000)
| }
| </script>
|
| <style>
| html,
| body,
| #app {
| width: 100%;
| height: 100%;
| }
| </style>
|
|