登录处理

This commit is contained in:
2025-12-30 22:54:57 -08:00
parent a9cbd2b921
commit ab5de5e0f5
7 changed files with 51 additions and 13 deletions
+14 -3
View File
@@ -25,10 +25,14 @@
<script setup lang="ts">
import { Laptop, Smartphone, Tablet, Monitor, Cpu, HelpCircle, X } from 'lucide-vue-next'
import request from '@/utils/request'
import { toast } from 'vue-sonner'
interface Device {
id: string
name: string
user_agent: string
identifier: string
type: 'mobile' | 'desktop'
deviceId: string
}
@@ -37,13 +41,20 @@ defineProps<{
devices: Device[]
}>()
function delDevice(item) {
console.log('Device removed', item)
const emit = defineEmits(['refresh'])
function delDevice(device: Device) {
if (confirm('请确认是否移除此设备?')) {
request.put('/api/v1/public/user/unbind_device', { id: device.id }).then(() => {
toast.success('设备已移除')
emit('refresh')
})
}
}
interface DeviceTypeInfo {
type: string
icon: string
iconComponent: any
}
/**