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

const actions = {
  async create({ commit }, payload) {
    const res = await this.$axios.$post(`${api.applymmoneyInfo}`, payload);
    return res;
  },
  async amlist({ commit }, payload) {
    //根据金融机构ID查询申请理财信息
    const res = await this.$axios.$post(`${api.applymmoneyInfo}/amlist`, payload);
    return res;
  },
  async one({ commit }, payload) {
    const res = await this.$axios.$post(`${api.applymmoneyInfo}/one`, payload);
    return res;
  },
  async changefollow({ commit }, payload) {
    const res = await this.$axios.$post(`${api.applymmoneyInfo}/changefollow`, payload);
    return res;
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
