diff --git a/quasar.config.js b/quasar.config.js index db15878..a094f80 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -80,6 +80,7 @@ module.exports = configure(function (/* ctx */) { // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer devServer: { // https: true + port: 9090, open: true, // opens browser window automatically }, diff --git a/src/components/OriginalLinkItem.vue b/src/components/OriginalLinkItem.vue index c6a45de..886885e 100644 --- a/src/components/OriginalLinkItem.vue +++ b/src/components/OriginalLinkItem.vue @@ -41,14 +41,6 @@ export default defineComponent({ const outtext = ref('') const signal_style = computed(() => { - // let tmp = '' - // if (time.value >= 0 && time.value <= 700) { - // tmp = 'green' - // } else if (time.value > 700 && time.value < 1400) { - // tmp = '#FF9800' - // } else { - // tmp = 'red' - // } return getColorForDelay(time.value) }) @@ -61,9 +53,11 @@ export default defineComponent({ vless.name = props.names[index] vless.host = ip vless.port = 9000 - vless.params.path = '/' - vless.params.security = 'none' - api.get_server_ms(ip, 9000, ip, 0).then((res) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + vless.params!.path = '/' + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + vless.params!.security = 'none' + api.get_server_ms(ip, 9000, '', 0).then((res) => { console.log(res) time.value = res.time online.value = res.is_online diff --git a/src/pages/IndexPage.vue b/src/pages/IndexPage.vue index 6c5f56e..bff3deb 100644 --- a/src/pages/IndexPage.vue +++ b/src/pages/IndexPage.vue @@ -47,8 +47,8 @@ export default defineComponent({ const names = ref([]) onMounted(() => { api.get_server().then((res) => { - for (let index = 0; index < res.data.length; index++) { - serves.value.push(res.data[index]); + for (let index = 0; index < res.data.data.length; index++) { + serves.value.push(res.data.data[index]); } }) }) @@ -74,6 +74,11 @@ export default defineComponent({ } // eslint-disable-next-line vue/no-side-effects-in-computed-properties if (tmp.name) { names.value.push(tmp.name) } + // eslint-disable-next-line vue/no-async-in-computed-properties + api.get_server_ms(tmp.server, tmp.port, tmp.query.path, 0).then((res) => { + console.log(res) + online.value = res.is_online + }) } }