You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
407 B
20 lines
407 B
/*
|
|
* @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);
|
|
}
|
|
} |