修改端口解决新后端api对接问题
This commit is contained in:
parent
4cc3befc07
commit
c8aeaad963
|
@ -80,6 +80,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
||||||
devServer: {
|
devServer: {
|
||||||
// https: true
|
// https: true
|
||||||
|
port: 9090,
|
||||||
open: true, // opens browser window automatically
|
open: true, // opens browser window automatically
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -41,14 +41,6 @@ export default defineComponent({
|
||||||
const outtext = ref('')
|
const outtext = ref('')
|
||||||
|
|
||||||
const signal_style = computed(() => {
|
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)
|
return getColorForDelay(time.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -61,9 +53,11 @@ export default defineComponent({
|
||||||
vless.name = props.names[index]
|
vless.name = props.names[index]
|
||||||
vless.host = ip
|
vless.host = ip
|
||||||
vless.port = 9000
|
vless.port = 9000
|
||||||
vless.params.path = '/'
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
vless.params.security = 'none'
|
vless.params!.path = '/'
|
||||||
api.get_server_ms(ip, 9000, ip, 0).then((res) => {
|
// 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)
|
console.log(res)
|
||||||
time.value = res.time
|
time.value = res.time
|
||||||
online.value = res.is_online
|
online.value = res.is_online
|
||||||
|
|
|
@ -47,8 +47,8 @@ export default defineComponent({
|
||||||
const names = ref(<string[]>[])
|
const names = ref(<string[]>[])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
api.get_server().then((res) => {
|
api.get_server().then((res) => {
|
||||||
for (let index = 0; index < res.data.length; index++) {
|
for (let index = 0; index < res.data.data.length; index++) {
|
||||||
serves.value.push(res.data[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
|
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||||
if (tmp.name) { names.value.push(tmp.name) }
|
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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue