import { getYj } from "@/api/taicangpop/block.js";

const taicang = {
  state: {
    yjTotal: 0,
    leftColor: {
      HZ: "#008c5e",
      HL: "#008c5e",
      HO: "#008c5e",
      HF: "#008c5e",
      NZ: "#7f8c95",
      NL: "#7f8c95",
      NO: "#7f8c95",
      NF: "#7f8c95",
    },
    rightTopColor: {
      HZ: "#008c5e",
      HL: "red",
      HO: "#7f8c95",
      HF: "#008c5e",
      NZ: "#008c5e",
      NL: "red",
      NO: "#7f8c95",
      NF: "#008c5e",
    },
  },
  mutations: {
    SET_YJ_TOTAL: (state, total) => {
      state.yjTotal = total;
    },
  },
  actions: {
    GetYjtotal({ commit }, queryParams) {
      return new Promise((resolve, reject) => {
        getYj().then((res) => {
          commit("SET_YJ_TOTAL", res.data);
          resolve();
        });
      });
    },
  },
};

export default taicang;
