|
@@ -16,13 +16,14 @@
|
|
|
defineOptions({name: 'personal-personCenter-studentInformation-index'})
|
|
|
import { ref } from 'vue'
|
|
|
import { saveStudentSimpleInfo } from '@/api/recruit/personal/shareJob'
|
|
|
-import { schoolList, departmentList, getStudentInfo } from '@/api/recruit/personal/resume'
|
|
|
+import { schoolList, departmentList } from '@/api/recruit/personal/resume'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { isValidIdCard18 } from '@/utils/validate'
|
|
|
+import { useUserStore } from '@/store/user'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
-
|
|
|
+const userStore = useUserStore()
|
|
|
const overlay = ref(false)
|
|
|
|
|
|
const CtFormRef = ref()
|
|
@@ -149,8 +150,7 @@ const getDepartmentList = async (e) => {
|
|
|
|
|
|
// 获取学生基本信息
|
|
|
const getStudentInfoFun = async () => {
|
|
|
- const data = await getStudentInfo()
|
|
|
- localStorage.setItem('studentInfo', data ? JSON.stringify(data) : '{}')
|
|
|
+ const data = JSON.parse(localStorage.getItem('studentInfo') || '{}')
|
|
|
if (data.schoolId) getDepartmentList(data.schoolId)
|
|
|
// 回显
|
|
|
items.value.options.forEach(e => {
|
|
@@ -170,8 +170,8 @@ const handleSubmit = async () => {
|
|
|
params[item.key] = item.value
|
|
|
})
|
|
|
await saveStudentSimpleInfo(params)
|
|
|
- // getStudentInfoFun()
|
|
|
setTimeout(async () => {
|
|
|
+ await userStore.getStudentInformation()
|
|
|
Snackbar.success(t('common.submittedSuccessfully'))
|
|
|
overlay.value = false
|
|
|
}, 1000)
|