fix: 优化token信息获取逻辑 添加空值校验
This commit is contained in:
@@ -7,6 +7,7 @@ const result = ref()
|
|||||||
const value = ref('')
|
const value = ref('')
|
||||||
|
|
||||||
const getInfo = () => {
|
const getInfo = () => {
|
||||||
|
if (value.value != '') {
|
||||||
axios.get('/api/token/info', {
|
axios.get('/api/token/info', {
|
||||||
params: {
|
params: {
|
||||||
token: value.value
|
token: value.value
|
||||||
@@ -16,6 +17,7 @@ const getInfo = () => {
|
|||||||
result.value = res.data.result
|
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()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user