yws_dev #70
|
@ -59,24 +59,27 @@ const getSubject = () => {
|
||||||
// 选择学段
|
// 选择学段
|
||||||
const handleUserEduStage = (item) => {
|
const handleUserEduStage = (item) => {
|
||||||
userStore.edustage = item
|
userStore.edustage = item
|
||||||
sessionStore.set('edustage',item)
|
sessionStore.set('edustageSelf',item)
|
||||||
if(item === '幼儿园'){
|
if(item === '幼儿园'){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '语文'
|
userStore.edusubject = '语文'
|
||||||
|
sessionStore.set('edusubjectSelf','语文')
|
||||||
}
|
}
|
||||||
else if(item === '高中' && userStore.edusubject === "道德与法治"){
|
else if(item === '高中' && userStore.edusubject === "道德与法治"){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '政治'
|
userStore.edusubject = '政治'
|
||||||
|
sessionStore.set('edusubjectSelf','政治')
|
||||||
}
|
}
|
||||||
else if(item != '高中' && userStore.edusubject === "政治"){
|
else if(item != '高中' && userStore.edusubject === "政治"){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '道德与法治'
|
userStore.edusubject = '道德与法治'
|
||||||
|
sessionStore.set('edusubjectSelf','道德与法治')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 选择学科
|
// 选择学科
|
||||||
const handleUserEduSubject = (item) => {
|
const handleUserEduSubject = (item) => {
|
||||||
userStore.edusubject = item;
|
userStore.edusubject = item;
|
||||||
sessionStore.set('edusubject',item)
|
sessionStore.set('edusubjectSelf',item)
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
|
|
|
@ -165,8 +165,8 @@ setTimeout(() => {
|
||||||
function submit() {
|
function submit() {
|
||||||
proxy.$refs.userRef.validate((valid) => {
|
proxy.$refs.userRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
userStore.user.edusubject = sessionStore.get('edusubject') ? sessionStore.get('edusubject') : userStore.user.edusubject
|
userStore.user.edusubject = sessionStore.get('edusubjectSelf') ? sessionStore.get('edusubjectSelf') : userStore.user.edusubject
|
||||||
userStore.user.edustage = sessionStore.get('edustage') ? sessionStore.get('edustage') : userStore.user.edustage
|
userStore.user.edustage = sessionStore.get('edustageSelf') ? sessionStore.get('edustageSelf') : userStore.user.edustage
|
||||||
updateUserInfo(userStore.user).then((response) => {
|
updateUserInfo(userStore.user).then((response) => {
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {
|
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue