|
@@ -5,6 +5,7 @@ import {
|
|
|
getFreeUserSubscribeList,
|
|
|
getSVIPBuyInfo,
|
|
|
getEntNicheSubKeyList,
|
|
|
+ entBaseInfo,
|
|
|
getBigMemberInfo
|
|
|
} from '@/api/modules'
|
|
|
import { formatKeywordsList } from '@/utils/format'
|
|
@@ -35,6 +36,8 @@ export default {
|
|
|
isDeleteAllBuyClass: defaultLocalPageData('bigmember-login-clear-DELETE_BUY_CLASS', false),
|
|
|
// 用户订阅关键词列表(包含免费订阅/超级订阅/大会员/商机管理)
|
|
|
subscribeKeyList: [],
|
|
|
+ // entInfo企业相关信息
|
|
|
+ entInfo: {},
|
|
|
// 用户访问灰显记录列表
|
|
|
visitedList: defaultLocalPageData('visited-path-list', [])
|
|
|
}),
|
|
@@ -51,6 +54,30 @@ export default {
|
|
|
state.power = power
|
|
|
localStorage.setItem('bigmember-login-clear-power', JSON.stringify(power))
|
|
|
},
|
|
|
+ setEntInfo (state, obj = {}) {
|
|
|
+ // obj = {
|
|
|
+ // admin_department: false,
|
|
|
+ // admin_system: false,
|
|
|
+ // dept_eid: '4656485c0140',
|
|
|
+ // dept_id: 2982,
|
|
|
+ // dept_name: '部门C',
|
|
|
+ // dept_pid: 2979,
|
|
|
+ // dept_subdis: 1,
|
|
|
+ // enddate: 1857484799,
|
|
|
+ // ent_auth_status: 1,
|
|
|
+ // ent_id: '455645580138',
|
|
|
+ // ent_model: 1,
|
|
|
+ // ent_name: '洛阳市洛西建筑有限公司',
|
|
|
+ // ent_status: 1,
|
|
|
+ // startdate: 1604993069,
|
|
|
+ // user_id: 'xxxxxxxx',
|
|
|
+ // user_name: 'xxxxxxxxx',
|
|
|
+ // user_power: 1
|
|
|
+ // }
|
|
|
+ if (Object.keys(obj).length) {
|
|
|
+ state.entInfo = obj
|
|
|
+ }
|
|
|
+ },
|
|
|
// 设置的业务范围
|
|
|
setScope (state, data) {
|
|
|
state.scope = data
|
|
@@ -111,6 +138,18 @@ export default {
|
|
|
return {}
|
|
|
}
|
|
|
},
|
|
|
+ // 获取企业信息
|
|
|
+ async getEntInfo ({ commit }) {
|
|
|
+ try {
|
|
|
+ const { data = {}, error_code: code } = await entBaseInfo()
|
|
|
+ if (code === 0 && data) {
|
|
|
+ commit('setEntInfo', data)
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ },
|
|
|
async getUserPower ({ commit, state }, payload) {
|
|
|
try {
|
|
|
const { data, error_code: code } = await getUserPower()
|