2
0

test: 测试连通上网

This commit is contained in:
TsMask
2024-12-06 21:30:39 +08:00
parent 850ccff852
commit e637781987
2 changed files with 71 additions and 1 deletions

View File

@@ -1,7 +1,8 @@
<script setup lang="ts">
import { useAuthStore } from '@/store/modules/auth';
import {clientUnAuth,clientAuth, clientInfo} from '@/service/ue/client';
import { useRouter } from 'vue-router';
import { computed } from 'vue';
import { ref, computed } from 'vue';
import { UserOutlined } from '@ant-design/icons-vue';
const router = useRouter();
@@ -28,10 +29,47 @@ const menuItems = [
icon: 'i-carbon:devices',
title: '设备管理',
path: '/user/devices'
},
{
icon: 'i-carbon:devices',
title: '终端上网',
path: 'auth'
},
{
icon: 'i-carbon:devices',
title: '终端下线',
path: 'unauth'
},
{
icon: 'i-carbon:devices',
title: '终端信息',
path: 'info'
}
];
const infoC = ref({})
const handleMenuClick = (path: string) => {
if(path==="auth"){
clientAuth().then((res)=>{
console.log(res)
infoC.value = res.data
})
return
}
if(path==="unauth"){
clientUnAuth().then((res)=>{
console.log(res)
infoC.value = res.data
})
return
}
if(path==="info"){
clientInfo().then((res)=>{
console.log(res)
infoC.value = res.data
})
return
}
router.push(path);
};
</script>
@@ -76,6 +114,7 @@ const handleMenuClick = (path: string) => {
</div>
</div>
</div>
{{infoC || '无信息'}}
</div>
</template>