import Vue from 'vue';
import Vuex from 'vuex';
import _ from 'lodash';
Vue.use(Vuex);
const api = {
  list: `/api/cms/img/list`,
  fetch: id => `/api/cms/img/list/${id}`,
};
export const state = () => ({});
export const mutations = {};
export const actions = {
  //在线招聘
  async getLink({ state }) {
    let result = {};
    let corps = await this.$axios.$get(api.list, { type: 'cooperation', is_use: '0' });
    if (corps.errcode === 0) result.corps = corps.data;
    let links = await this.$axios.$get(api.list, { type: 'link', is_use: '0' });
    if (links.errcode === 0) result.links = links.data;
    return result;
  },
};
