From 9ca13cda768fe72761396693859c5a321bfc8a72 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Sat, 10 Dec 2022 22:01:43 +0800 Subject: [PATCH] =?UTF-8?q?--=20=E8=B7=AF=E5=BE=84=E5=B8=A6=E5=87=BA?= =?UTF-8?q?=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/views/learningpath/LearningPath.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index 75571e26..cd2f22de 100644 --- a/src/App.vue +++ b/src/App.vue @@ -86,7 +86,7 @@ export default defineComponent({ async function getUserInfo() { const userInfo = await api2.userInfo(); - store.commit("SET_USER", userInfo); + store.commit("SET_USER", userInfo.data.data); } async function initDict(key, localStory = false) { diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 138223a6..b0ac059d 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -834,12 +834,13 @@ export default { console.log("e", e, a); }; const handleOut = () => { + console.log(store.state) // console.log("打开创建路径弹窗"); state.pathName = ""; state.pathBg = ""; state.pathBgId = ""; - state.organizationSelectName = null; - state.organizationSelectId = null; + state.organizationSelectName = store.state.userInfo.departId; + state.organizationSelectId = store.state.userInfo.departName; state.pathIntro = ""; state.out = !state.out; };