import {
	WeaTools
} from 'ecCom'

export const getTreeTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/upgrade/getTreeTabs', 'POST', params);

export const getUpgradeInfo = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/get${params.type}`, 'POST', params);

export const doUpgrade = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/do${params.type}`, 'POST', params);

export const getUpgrade12Data = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/getUpgrade12Data`, 'POST', params);

export const init = (params = {}) => Promise.all([getTreeTabs(), getUpgradeInfo({type: 'Upgrade1'})]);