<template>
<div class="h-[100px] shadow-lg flex items-center justify-between px-12  z-10">
  <div class="flex space-x-4 items-center">
    <img class="h-[60px]" src="@/assets/logo.png" alt="">
    <div class="text-[24px] font-bold">
      可达鸭海淘蹲货
    </div>
  </div>
  <div>
    <div>当前代理个数: {{proxiesInfo.list.length}}</div>
    <div class="text-[14px]">代理更新时间：{{moment(proxiesInfo.updated).format('YYYY-MM-DD HH:mm:ss')}}</div>
  </div>
</div>
</template>
<script setup>
import {onMounted, reactive} from "vue";
import {getProxiesStatus} from "@/api/proxies.js";
import moment from "moment";

const proxiesInfo = reactive({
  list:[],
  updated: ''
})

onMounted(()=>{
  loadProxiesInfo()
})
const loadProxiesInfo = ()=>{
  getProxiesStatus().then(res=>{
    proxiesInfo.list = res.list
    proxiesInfo.updated = res.updated
  })
}
</script>

<style scoped>

</style>