import Vue from 'vue';
import Vuex from 'vuex';
import _ from 'lodash';
Vue.use(Vuex);
const api = {
  stockInfo: `/api/financial/stockneed`,
};
const state = () => ({});
const mutations = {};

const actions = {
  async followstock({ commit }, payload) {
    // 金融机构关注股权需求
    const res = await this.$axios.$post(`${api.stockInfo}/followstock`, payload);
    return res;
  },
  async stockList({ commit }, payload) {
    // 股权列表
    const res = await this.$axios.$post(`${api.stockInfo}/stockList`, payload);
    return res;
  },
  async one({ commit }, payload) {
    // 股权详情
    const res = await this.$axios.$post(`${api.stockInfo}/one`, payload);
    return res;
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
