| | |
| | | import { getStorage, setStorage, changeTheme, fetchData } from "@/utils/utis"; |
| | | import { getStorage, setStorage, changeTheme } from "@/utils/utis"; |
| | | import { |
| | | SET_COIN_LIST, |
| | | SET_CURRENCY, |
| | |
| | | hotArr: [], // 热门币种 |
| | | coinList: [], // 品种 |
| | | kefu_url: "", |
| | | theme: getStorage("theme") || "dark", |
| | | baic: getStorage("baic") || "jy.coasdisxx123.online", |
| | | baicArr: [], |
| | | theme: "light", |
| | | }, |
| | | getters: { |
| | | coinList: (state) => state.coinList, |
| | |
| | | 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); |
| | |
| | | }, |
| | | }, |
| | | 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 }) { |
| | | // 获取配置的币种 |
| | | |