zzzz
2024-04-19 41f60633cbdaed2c633f90e43ca0c83fb3fdb975
src/store/modules/home.store.js
@@ -1,4 +1,4 @@
import { getStorage, setStorage, changeTheme, fetchData } from "@/utils/utis";
import { getStorage, setStorage, changeTheme } from "@/utils/utis";
import {
  SET_COIN_LIST,
  SET_CURRENCY,
@@ -17,9 +17,7 @@
    hotArr: [], // 热门币种
    coinList: [], // 品种
    kefu_url: "",
    theme: getStorage("theme") || "dark",
    baic: getStorage("baic") || "jy.coasdisxx123.online",
    baicArr: [],
    theme: "light",
  },
  getters: {
    coinList: (state) => state.coinList,
@@ -30,23 +28,6 @@
    theme: (state) => state.theme,
  },
  mutations: {
    SET_BAIC(state, payload) {
      console.log(payload);
      payload.unshift({
        title: "线路",
        type: "jy.coasdisxx123.online",
        value: 1,
        id: 10,
      });
      state.baicArr = payload;
      setStorage("baicArr", payload);
    },
    SET_BAIC_ARR(state, payload) {
      state.baic = payload;
      setStorage("baic", payload);
      window.location.reload(true);
    },
    [SET_THEME]: (state, theme) => {
      state.theme = theme;
      window.document.documentElement.setAttribute("data-theme", theme);
@@ -77,11 +58,6 @@
    },
  },
  actions: {
    async setBaic({ commit }, data) {
      console.log(data, "type");
      commit("SET_BAIC", data);
      // window.localStorage.setItem("phones", userInfo.adminPhone);
    },
    async [SET_COIN_LIST]({ commit, state }) {
      // 获取配置的币种