瀏覽代碼

判断当前求职者是否有老师的角色

Xiao_123 1 月之前
父節點
當前提交
807b86eb82

+ 1 - 1
src/layout/personal/navBar.vue

@@ -165,7 +165,7 @@ const getSchoolInfo = async () => {
   const data = await getSchoolInformation()
   if (data && Object.keys(data).length > 0) {
     schoolInfo.value = data
-    showTeacherLogin.value = isSchool ? false : true
+    showTeacherLogin.value = isSchool ? true : false
   }
 }
 

+ 1 - 1
src/views/recruit/personal/PersonalCenter/student/information/index.vue

@@ -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)