/* * @Author: ch * @Date: 2022-05-04 20:35:20 * @LastEditors: ch * @LastEditTime: 2022-05-07 22:33:28 * @Description: file content */ import { TOKEN } from "@/plugins/config/sotrageKey"; export const state = () => ({ token: '' }) export const mutations = { SET_TOKEN (state, token = ''){ state.token = token; token ? localStorage.setItem(TOKEN, token) : localStorage.removeItem(TOKEN); } }