|
@@ -11,10 +11,9 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, onMounted, nextTick, provide } from "vue"
|
|
|
-import { useDarkThemeHook, useLang } from '@/hooks'
|
|
|
+import { useDarkThemeHook, useLang,AcquisitionArea } from '@/hooks'
|
|
|
import { useSystemStore } from '@/store/modules/systemStore'
|
|
|
import axios from "axios";
|
|
|
-import { EnvTypeNum } from '@/settings/designSetting'
|
|
|
const isRouterActive = ref(true)
|
|
|
// 全局语言
|
|
|
const { locale } = useLang()
|
|
@@ -30,31 +29,18 @@ provide('reloadRoutePage', () => {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-// 获取当前用户ip
|
|
|
+
|
|
|
async function getIpClient() {
|
|
|
- try {
|
|
|
- const response = await axios.get('https://ipinfo.io/json');
|
|
|
- systemStore.USER_IP = response.data
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
+ try {
|
|
|
+ const response = await axios.get('https://ipinfo.io/json');
|
|
|
+ systemStore.USER_IP = response.data
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
onMounted(async () => {
|
|
|
- let favicon = document.querySelector('link[rel="icon"]')
|
|
|
- if(EnvTypeNum===0){
|
|
|
- window.document.title = 'Easy life'
|
|
|
- favicon.href = '/src/assets/images/logo.png'
|
|
|
- }else{
|
|
|
- window.document.title = 'FlexiStream'
|
|
|
- favicon.href = '/src/assets/images/logo.jpg'
|
|
|
- }
|
|
|
- const getLoadingNode = document.getElementById('Loading')
|
|
|
- const { body } = document
|
|
|
- if (getLoadingNode) {
|
|
|
- body.removeChild(getLoadingNode)
|
|
|
- }
|
|
|
+ AcquisitionArea()
|
|
|
getIpClient()
|
|
|
})
|
|
|
</script>
|