12345678910111213141516171819202122232425 |
- 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
- };
|