From b4668a820cb11703613c59d6529898e230be0b28 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期一, 04 八月 2025 14:57:18 +0800 Subject: [PATCH] bug修改 --- src/views/login/index.vue | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 2419b5a..ae5111e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -95,10 +95,17 @@ isAdmin = true; } }) + if (isAdmin) { - findStaffByUserId(res.id).then(staffs => { - localStorage.setItem("staffs", JSON.stringify(staffs)); - localStorage.setItem("selectStaff", JSON.stringify(staffs[0])); + findStaffByUserId(res.id).then(sres => { + + if (sres.data && sres.data.findStaffByUserId) { + var staffs = sres.data.findStaffByUserId; + localStorage.setItem("staffs", JSON.stringify(staffs)); + localStorage.setItem("selectStaff", JSON.stringify(staffs[0])); + + this.$EventBus.$emit("updateStaffs", '123'); + } }) } -- Gitblit v1.8.0