diff --git a/src/views/dashboard/demo/index.vue b/src/views/dashboard/demo/index.vue index f12ad38..2157827 100644 --- a/src/views/dashboard/demo/index.vue +++ b/src/views/dashboard/demo/index.vue @@ -21,9 +21,10 @@ setTimeout(() => { }, 500) const data = ref(data1) -const id = ref(route.query.id) +const id = route.path.split('/').pop() || '' onBeforeMount(async () => { - const res = await getDeviceInfo(id.value) + console.log(route.path) + const res = await getDeviceInfo(id) console.log(res) if (res) data.value = JSON.parse(res.Page_Content)