📅  最后修改于: 2022-03-11 15:02:13.232000             🧑  作者: Mango
// call
store.commit('authenticate', {
token,
expiration,
});
// mutation
mutations: {
authenticate(state, { token, expiration }) {
localStorage.setItem('token', token);
localStorage.setItem('expiration', expiration);
}
}