fix: 优化token信息获取逻辑 添加空值校验

This commit is contained in:
2025-09-02 12:38:20 +08:00
parent b47e1fa881
commit 5ee4291356

View File

@@ -7,15 +7,17 @@ const result = ref()
const value = ref('') const value = ref('')
const getInfo = () => { const getInfo = () => {
axios.get('/api/token/info', { if (value.value != '') {
params: { axios.get('/api/token/info', {
token: value.value params: {
} token: value.value
}).then(res => { }
if (res.status == 200) { }).then(res => {
result.value = res.data.result if (res.status == 200) {
} result.value = res.data.result
}) }
})
}
} }
const deleteDedup = () => { const deleteDedup = () => {
@@ -43,7 +45,6 @@ getInfo()
setInterval(getInfo, 5000) setInterval(getInfo, 5000)
watch(value, (newValue) => { watch(value, (newValue) => {
console.log(newValue)
getInfo() getInfo()
}) })