|
@@ -18,6 +18,7 @@ import { timesTampChange } from '@/utils/date'
|
|
|
import { updateEventList } from '@/utils/eventList'
|
|
|
import { getBaseInfoDictOfName } from '@/utils/getText'
|
|
|
import { checkPersonBaseInfo } from '@/utils/check'
|
|
|
+import { getStudentInfo } from '@/api/recruit/personal/resume'
|
|
|
// import Confirm from '@/plugins/confirm'
|
|
|
|
|
|
// import { useIMStore } from './im'
|
|
@@ -34,7 +35,8 @@ export const useUserStore = defineStore('user',
|
|
|
baseInfo: localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')) : {}, // 人才信息
|
|
|
entBaseInfo: localStorage.getItem('entBaseInfo') ? JSON.parse(localStorage.getItem('entBaseInfo')) : {}, // 企业个人信息
|
|
|
userAccount: {}, // 用户账户信息
|
|
|
- enterpriseUserAccount: {} // 企业账户信息
|
|
|
+ enterpriseUserAccount: {}, // 企业账户信息
|
|
|
+ studentInfo: localStorage.getItem('studentInfo') ? JSON.parse(localStorage.getItem('studentInfo')) : {}, // 学生信息
|
|
|
}),
|
|
|
actions: {
|
|
|
// 个人用户注册并登录
|
|
@@ -98,7 +100,6 @@ export const useUserStore = defineStore('user',
|
|
|
// 获取当前登录账户信息
|
|
|
async getUserInfos () {
|
|
|
try {
|
|
|
- // const api = getIsEnterprise() ? getEnterprisingUserInfo : getUserInfo
|
|
|
const data = await getUserInfo({ id: this.accountInfo.userId })
|
|
|
this.userInfo = data
|
|
|
localStorage.setItem('userInfo', JSON.stringify(data))
|
|
@@ -225,19 +226,7 @@ export const useUserStore = defineStore('user',
|
|
|
if (!data?.bizFlag) { // 企业登录免费职位广告提示,除了true都弹窗
|
|
|
localStorage.setItem('positionAd', 'showPositionAd')
|
|
|
}
|
|
|
- // // 检验必填信息
|
|
|
- // const keyArr = ['industryId', 'financingStatus', 'scale', 'introduce', 'logoUrl'] // 必填信息列表
|
|
|
- // let href = '/recruit/enterprise/entInfoSetting'
|
|
|
- // const valid = Object.keys(data).length && keyArr.every(e => {
|
|
|
- // const bool = data[e] && data[e] !== 0
|
|
|
- // if (!bool && e === 'logoUrl') href = '/recruit/enterprise/entInfoSetting?tabKey=2'
|
|
|
- // return bool
|
|
|
- // })
|
|
|
- // if (!valid) {
|
|
|
- // localStorage.setItem('checkEnterpriseBaseInfoFalseHref', href)
|
|
|
- // }
|
|
|
} catch (error) {
|
|
|
- // console.log(error)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -263,6 +252,17 @@ export const useUserStore = defineStore('user',
|
|
|
// 强制修改密码
|
|
|
localStorage.setItem('entUpdatePassword', bool ? 'needChange' : 'doNotNeedChange')
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取学生信息
|
|
|
+ async getStudentInformation () {
|
|
|
+ try {
|
|
|
+ const data = await getStudentInfo()
|
|
|
+ this.studentInfo = data
|
|
|
+ localStorage.setItem('studentInfo', JSON.stringify(data))
|
|
|
+ } catch (error) {
|
|
|
+ Snackbar.error(error.msg)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|