- Add new /getAccounts API for fast account retrieval without validation - Update frontend to use fast API for initial load, showing accounts immediately - Add '验证中' status with loading animation to indicate validation progress - Implement background validation process that doesn't block UI - Add Loading icon from Element Plus for visual feedback during validation - Update status display logic to handle '验证中', '正常', and invalid states - Improve user experience with immediate feedback and async validation
29 lines
595 B
JavaScript
29 lines
595 B
JavaScript
import { http } from '@/utils/request'
|
|
|
|
// 账号管理相关API
|
|
export const accountApi = {
|
|
// 获取有效账号列表(带验证)
|
|
getValidAccounts() {
|
|
return http.get('/getValidAccounts')
|
|
},
|
|
|
|
// 获取账号列表(不带验证,快速加载)
|
|
getAccounts() {
|
|
return http.get('/getAccounts')
|
|
},
|
|
|
|
// 添加账号
|
|
addAccount(data) {
|
|
return http.post('/account', data)
|
|
},
|
|
|
|
// 更新账号
|
|
updateAccount(data) {
|
|
return http.post('/updateUserinfo', data)
|
|
},
|
|
|
|
// 删除账号
|
|
deleteAccount(id) {
|
|
return http.get(`/deleteAccount?id=${id}`)
|
|
}
|
|
} |