1 line
1.6 KiB
JSON
1 line
1.6 KiB
JSON
{"ast":null,"code":"import { ref, computed, onMounted } from \"vue\";\nimport { useStore } from \"vuex\";\nimport { NavBar } from \"vant\";\nexport default {\n name: \"HallNav\",\n components: {\n NavBar\n },\n setup() {\n const showBnt = ref(false);\n const store = useStore();\n const wayType = computed(() => store.state.config.hallWayType);\n const userInfo = computed(() => store.state.app.userInfo);\n const Type = computed(() => store.state.config.$Type);\n const Lang = computed(() => store.state.config.$lang);\n const showMenu = () => {\n store.commit(\"config/showMenu\", true);\n };\n const toggleDrop = () => {\n showBnt.value = !showBnt.value;\n };\n const checkType = type => {\n store.commit(\"config/updateHallWayType\", type);\n showBnt.value = false;\n };\n const logout = () => {\n const protocol = document.location.protocol;\n const hostname = document.location.hostname;\n const port = document.location.port;\n let url = \"\";\n if (port) {\n url = `${protocol}//${hostname}:${port}`;\n } else {\n url = `${protocol}//${hostname}`;\n }\n window.location.href = url;\n };\n const toggleAplayer = () => {\n store.commit(\"config/showAplayer\");\n };\n onMounted(() => {\n store.commit(\"app/updateGameId\", 1);\n });\n return {\n Type,\n Lang,\n showBnt,\n wayType,\n userInfo,\n showMenu,\n checkType,\n toggleDrop,\n toggleAplayer,\n logout\n };\n },\n methods: {}\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]} |