add user_token
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { reactive } from 'vue'
|
||||
import { list, remove } from '@/api/login_log'
|
||||
import { list as fetchPeers } from '@/api/peer'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { T } from '@/utils/i18n'
|
||||
@@ -23,6 +24,15 @@ export function useRepositories () {
|
||||
const res = await list(listQuery).catch(_ => false)
|
||||
listRes.loading = false
|
||||
if (res) {
|
||||
const uuids = res.data.list.filter(item => item.uuid).map(item => item.uuid)
|
||||
const peers = await fetchPeers({ uuids }).catch(_ => false)
|
||||
if (peers?.data?.list) {
|
||||
res.data.list.forEach(item => {
|
||||
if (item.uuid) {
|
||||
item.peer = peers.data.list.find(peer => peer.uuid === item.uuid)
|
||||
}
|
||||
})
|
||||
}
|
||||
listRes.list = res.data.list
|
||||
listRes.total = res.data.total
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user