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; };