@@ -21,7 +21,7 @@ const updateTime = () => {
|
||||
|
||||
const fetchInfo = async () => {
|
||||
if (!input.value) return
|
||||
loading.value = true
|
||||
|
||||
try {
|
||||
const res = await axios.get('/api/token/info', {
|
||||
params: {token: input.value}
|
||||
@@ -29,14 +29,18 @@ const fetchInfo = async () => {
|
||||
result.value = res.data.result
|
||||
token.value = input.value
|
||||
updateTime()
|
||||
// ElMessage({message: '刷新成功', type: 'success', duration: 1500})
|
||||
} catch {
|
||||
ElMessage({message: 'Token输入错误', type: 'error', duration: 2000})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const refresh = async () => {
|
||||
loading.value = true
|
||||
await fetchInfo()
|
||||
loading.value = false
|
||||
ElMessage({message: '查询成功', type: 'success', duration: 1500})
|
||||
}
|
||||
|
||||
const inputChange = () => {
|
||||
if (input.value) fetchInfo()
|
||||
}
|
||||
@@ -83,7 +87,7 @@ const statCards = [
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button type="primary" size="large" @click="fetchInfo" :loading="loading">
|
||||
<el-button type="primary" size="large" @click="refresh" :loading="loading">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button type="success" size="large" @click="showAddDataDialog = true">
|
||||
|
||||
Reference in New Issue
Block a user