From 1882fd0daec9ba08f9b152aa75e7555bd5c73c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Tue, 26 Nov 2024 10:36:41 +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=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=A7=91?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=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 | 3 +++ src/renderer/src/views/profile/userInfo.vue | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/views/profile/components/selectClass.vue b/src/renderer/src/views/profile/components/selectClass.vue index 24e3d48..ada1d13 100644 --- a/src/renderer/src/views/profile/components/selectClass.vue +++ b/src/renderer/src/views/profile/components/selectClass.vue @@ -42,6 +42,7 @@ import useUserStore from '@/store/modules/user' import {ArrowDown} from '@element-plus/icons-vue' import { onMounted,ref } from 'vue'; import { listEvaluation } from '@/api/subject/index' +import {sessionStore} from '@/utils/store' const userStore = useUserStore().user const subjectList = ref([]) // 获取基础的学科 @@ -58,6 +59,7 @@ const getSubject = () => { // 选择学段 const handleUserEduStage = (item) => { userStore.edustage = item + sessionStore.set('edustage',item) if(item === '幼儿园'){ // 默认语文 userStore.edusubject = '语文' @@ -74,6 +76,7 @@ const handleUserEduStage = (item) => { // 选择学科 const handleUserEduSubject = (item) => { userStore.edusubject = item; + sessionStore.set('edusubject',item) } onMounted(() => { getSubject() diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue index 6216179..b927274 100644 --- a/src/renderer/src/views/profile/userInfo.vue +++ b/src/renderer/src/views/profile/userInfo.vue @@ -162,7 +162,8 @@ setTimeout(() => { function submit() { proxy.$refs.userRef.validate((valid) => { if (valid) { - userStore.user.avatar = userStore.user.avatar + userStore.user.edusubject = sessionStore.get('edusubject') + userStore.user.edustage = sessionStore.get('edustage') updateUserInfo(userStore.user).then((response) => { if(response.code == 200){ userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {