修改端口解决新后端api对接问题

This commit is contained in:
lingling 2024-12-06 18:25:41 +08:00
parent 4cc3befc07
commit c8aeaad963
3 changed files with 13 additions and 13 deletions

View File

@ -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
},

View File

@ -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

View File

@ -47,8 +47,8 @@ export default defineComponent({
const names = ref(<string[]>[])
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
})
}
}