<script setup name="commonLogin">
import { onMounted } from 'vue'
import { singleLogin } from '@/http/apis/auth'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute(),
  router = useRouter()
onMounted(async () => {
  const postData = new URLSearchParams()
  postData.append('credential', route.query.PROVINCE_FOREIGN_USER_TOKEN)
  postData.append('platform', 'PROVINCIAL_BUREAU')
  await singleLogin(postData)
  router.replace('/')
})
</script>
