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.
shop-pc/store/index.js

20 lines
407 B

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