Compare commits

..

No commits in common. "c338f341278569bf3cf41065cb38fa9bec8a84a9" and "448c4d979f30b02796586baa00c1b9a61a0bb181" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -59,27 +59,24 @@ const getSubject = () => {
//
const handleUserEduStage = (item) => {
userStore.edustage = item
sessionStore.set('edustageSelf',item)
sessionStore.set('edustage',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('edusubjectSelf',item)
sessionStore.set('edusubject',item)
}
onMounted(() => {
getSubject()

View File

@ -165,8 +165,8 @@ setTimeout(() => {
function submit() {
proxy.$refs.userRef.validate((valid) => {
if (valid) {
userStore.user.edusubject = sessionStore.get('edusubjectSelf') ? sessionStore.get('edusubjectSelf') : userStore.user.edusubject
userStore.user.edustage = sessionStore.get('edustageSelf') ? sessionStore.get('edustageSelf') : userStore.user.edustage
userStore.user.edusubject = sessionStore.get('edusubject') ? sessionStore.get('edusubject') : userStore.user.edusubject
userStore.user.edustage = sessionStore.get('edustage') ? sessionStore.get('edustage') : userStore.user.edustage
updateUserInfo(userStore.user).then((response) => {
if(response.code == 200){
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {