From 1060929532bca256c5497da93ba3fcd5d63a9f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Wed, 27 Nov 2024 10:51:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=BB=98=E8=AE=A4=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/profile/components/selectClass.vue | 7 +++++-- src/renderer/src/views/profile/userInfo.vue | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/views/profile/components/selectClass.vue b/src/renderer/src/views/profile/components/selectClass.vue index ada1d13..2dcc47e 100644 --- a/src/renderer/src/views/profile/components/selectClass.vue +++ b/src/renderer/src/views/profile/components/selectClass.vue @@ -59,24 +59,27 @@ const getSubject = () => { // 选择学段 const handleUserEduStage = (item) => { userStore.edustage = item - sessionStore.set('edustage',item) + sessionStore.set('edustageSelf',item) if(item === '幼儿园'){ // 默认语文 userStore.edusubject = '语文' + sessionStore.set('edusubjectSelf','语文') } else if(item === '高中' && userStore.edusubject === "道德与法治"){ // 默认语文 userStore.edusubject = '政治' + sessionStore.set('edusubjectSelf','政治') } else if(item != '高中' && userStore.edusubject === "政治"){ // 默认语文 userStore.edusubject = '道德与法治' + sessionStore.set('edusubjectSelf','道德与法治') } } // 选择学科 const handleUserEduSubject = (item) => { userStore.edusubject = item; - sessionStore.set('edusubject',item) + sessionStore.set('edusubjectSelf',item) } onMounted(() => { getSubject() diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue index 7666bdf..5efcc0f 100644 --- a/src/renderer/src/views/profile/userInfo.vue +++ b/src/renderer/src/views/profile/userInfo.vue @@ -162,8 +162,8 @@ setTimeout(() => { function submit() { proxy.$refs.userRef.validate((valid) => { if (valid) { - userStore.user.edusubject = sessionStore.get('edusubject') ? sessionStore.get('edusubject') : userStore.user.edusubject - userStore.user.edustage = sessionStore.get('edustage') ? sessionStore.get('edustage') : userStore.user.edustage + userStore.user.edusubject = sessionStore.get('edusubjectSelf') ? sessionStore.get('edusubjectSelf') : userStore.user.edusubject + userStore.user.edustage = sessionStore.get('edustageSelf') ? sessionStore.get('edustageSelf') : userStore.user.edustage updateUserInfo(userStore.user).then((response) => { if(response.code == 200){ userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {