|
@@ -152,7 +152,7 @@ const getDepartmentList = async (id, key, type, isRefreshValue = false) => {
|
|
|
|
|
|
// 获取学生基本信息
|
|
|
const studentInfoFun = async () => {
|
|
|
- const data = JSON.parse(localStorage.getItem('studentInfo') || '{}')
|
|
|
+ const data = localStorage.getItem('studentInfo') ? JSON.parse(localStorage.getItem('studentInfo')) : null
|
|
|
if (!data || !Object.keys(data).length) await userStore.getStudentInformation()
|
|
|
if (data.schoolId) getDepartmentList(data.schoolId, 'schoolDeptId', 0)
|
|
|
if (data?.schoolClassId) getDepartmentList(data.schoolDeptId, 'schoolClassId', 2)
|