import { waitExamTaskCount } from "./api"; const state = { waitTaskCount: 0 }; const mutations = { setNotDoneTaskCount(state, waitTaskCount) { state.waitTaskCount = waitTaskCount; } }; const actions = { async updateWaitTaskCount({ commit }) { const count = await waitExamTaskCount().catch(() => {}); commit("setNotDoneTaskCount", count || 0); } }; export default { namespaced: true, state, mutations, actions };