|
@@ -18,6 +18,7 @@ import Snackbar from '@/plugins/snackbar'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { updateEventList } from '@/utils/eventList'
|
|
|
import { getBaseInfoDictOfName } from '@/utils/getText'
|
|
|
+import Confirm from '@/plugins/confirm'
|
|
|
|
|
|
// import { useIMStore } from './im'
|
|
|
|
|
@@ -160,12 +161,24 @@ export const useUserStore = defineStore('user',
|
|
|
localStorage.setItem('enterpriseUserAccount', JSON.stringify(data))
|
|
|
return data // 方便直接获取
|
|
|
},
|
|
|
+
|
|
|
// 获取《企业基本信息》
|
|
|
async checkEnterpriseBaseInfo () {
|
|
|
const data = await getEnterpriseBaseInfo()
|
|
|
- const keyArr = ['industryId', 'financingStatus', 'scale', 'introduce', 'logoUrl'] // 必填信息
|
|
|
- const check = Object.keys(data).length && keyArr.every(e => data[e] && data[e] !== 0) // 校验必填人才信息
|
|
|
- return check
|
|
|
+ // 检验必填信息
|
|
|
+ const keyArr = ['industryId', 'financingStatus', 'scale', 'introduce', 'logoUrl'] // 必填信息列表
|
|
|
+ let href = '/recruit/enterprise/informationManagement/informationSettings'
|
|
|
+ const valid = Object.keys(data).length && keyArr.every(e => {
|
|
|
+ const bool = data[e] && data[e] !== 0
|
|
|
+ if (!bool && e === 'logoUrl') href = '/recruit/enterprise/informationManagement/informationSettings?tabKey=2'
|
|
|
+ return bool
|
|
|
+ })
|
|
|
+ if (!valid) {
|
|
|
+ Confirm('系统提示', '企业信息设置未完善,是否前往完善?').then(() => {
|
|
|
+ window.location.href = href
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // return valid
|
|
|
},
|
|
|
|
|
|
// 获取用户账户信息
|