/* * @Author: ch * @Date: 2022-05-04 20:35:20 * @LastEditors: ch * @LastEditTime: 2022-05-04 21:39:42 * @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); } }