import {
  getFondWithPageUser,
} from "@/api/system-management/allAdministration"
import {
  getButtonList
} from "@/api/user"
import {
  message
} from '@/utils/common'
const getDefaultState = () => {
  return {

    //   treeLoading: false,
    //   treeData: [],
    //   showButtons: {
    //     addRoom: false,
    //     add: false,
    //     edit: false,
    //     del: false,
    //   },
  }
}
const state = getDefaultState()
const mutations = {
  FONDLIST(state, data) {
    state.fondsList = data.list
  },

}
const actions = {
  async getFondWithPageUser({
    commit,
    dispatch
  }, data) {
    await getFondWithPageUser(data).then(res => {
      try {
        commit('FONDLIST', res.body)
      } catch (err) {
        throw new Error(err)
      }
    })
  },

}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
