text: import {
      reqHomeMatchResult,
      reqAwayMatchResultt,
      reqHomeMatchNext2,
      reqTeamSuccess,
      reqLeagueSuccessAh,
      reqLeagueSuccessOu,
      reqAwayMatchNext2
  } from '@/api'
  
  const state = {
      HomeMatcheList: [],
      AwayMatcheList: [],
      MatchNext2: [],
      HomeTeamSuccess: {},
      AwayTeamSuccess: {},
      LeagueSuccessAh: [],
      LeagueSuccessOu: [],
  
  };
  const actions = {
      /* 获取主队 */
      async getHomeMatchResult({
          commit
      }, data) {
          let result = await reqHomeMatchResult(data)
          commit("GETHOMEMATCHRESULT", result);
      },
      /* 获取客队 */
      async getAwayMatchResult({
          commit
      }, data) {
          let result = await reqAwayMatchResultt(data)
          commit("GETAWAYMATCHRESULT", result);
      },
      /* 获取接下来的比赛 */
      async getHomeMatchNext2({
          commit
      }, data) {
          let result = await reqHomeMatchNext2(data)
  
          commit("GETHOMEMATCHNEXT2", result)
      },
      async getAwayMatchNext2({
          commit
      }, data) {
          let result = await reqAwayMatchNext2(data)
  
          commit("GETAWAYMATCHNEXT2", result)
      },
      /* 获取主队胜率 */
      async getHomeTeamSuccess({
          commit
      }, data) {
          let result = await reqTeamSuccess(data)
  
          commit("GETHOMETEAMSUCCESS", result)
      },
      /* 获取客队胜率 */
      async getAwayTeamSuccess({
          commit
      }, data) {
          let result = await reqTeamSuccess(data)
  
          commit("GETAWAYTEAMSUCCESS", result)
      },
      /* 获取亚洲盘数据 */
      async getLeagueSuccessAh({
          commit
      }, data) {
          let result = await reqLeagueSuccessAh(data)
  
          commit("GETLEAGUESUCCESSAH", result)
      },
      /* 获取联赛大小 */
      async getLeagueSuccessOu({
          commit
      }, data) {
          let result = await reqLeagueSuccessOu(data)
  
          commit("GETLEAGUESUCCESSOU", result)
      },
  };
  const mutations = {
      GETHOMEMATCHRESULT(state, HomeMatcheList) {
          state.HomeMatcheList = HomeMatcheList
      },
      GETAWAYMATCHRESULT(state, AwayMatcheList) {
          state.AwayMatcheList = AwayMatcheList
      },
      GETHOMEMATCHNEXT2(state, MatchNext2) {
          state.MatchNext2 = MatchNext2
      },
      GETHOMETEAMSUCCESS(state, HomeTeamSuccess) {
          state.HomeTeamSuccess = HomeTeamSuccess
      },
      GETAWAYTEAMSUCCESS(state, AwayTeamSuccess) {
          state.AwayTeamSuccess = AwayTeamSuccess
      },
      GETLEAGUESUCCESSAH(state, LeagueSuccessAh) {
          state.LeagueSuccessAh = LeagueSuccessAh
      },
      GETLEAGUESUCCESSOU(state, LeagueSuccessOu) {
          state.LeagueSuccessOu = LeagueSuccessOu
      },
      GETAWAYMATCHNEXT2(state, MatchNext2) {
          state.MatchNext2 = MatchNext2
      },
  };
  const getters = {
      getHomeMatcheList(state) {
          return state.HomeMatcheList.homeMatchResult || []
      },
      getAwayMatcheList(state) {
          return state.AwayMatcheList.awayMatchResult || []
      },
      getMatchNext2(state) {
          return state.MatchNext2.getHomeMatchNext2 || []
      },
      getHomeTeamSuccess(state) {
          return state.HomeTeamSuccess.map || {}
      },
      getAwayTeamSuccess(state) {
          return state.AwayTeamSuccess.map || {}
      },
      getLeagueSuccessAh(state) {
          return state.LeagueSuccessAh.list || [{
              pnl: 0,
              year: '2020-2021'
          }, {
              pnl: 0,
              year: '2021-2022'
          }]
      },
      getLeagueSuccessOu(state) {
          return state.LeagueSuccessOu.list || [{
              pnl: 0,
              year: '2020-2021'
          }, {
              pnl: 0,
              year: '2021-2022'
          }]
      }
  };
  export default ({
      state,
      mutations,
      actions,
      getters
  })