提交 7d3d2dcd 编写于 作者: 芊里

删除未完成模块

上级 418ef4c3
// 上次启动时的用户信息
let userHistory = uni.getStorageSync('userInfo') || null;
let state = {
/**
* 是否需要强制登录
*/
forcedLogin: false,
hasLogin: Boolean(userHistory),
info: userHistory
},
getters = {
info(state) {
return state.info;
},
hasLogin(state){
return state.hasLogin;
}
},
mutations = {
login(state, info) {
state.info = info;
state.hasLogin = true;
uni.setStorageSync('userInfo', info);
},
logout(state) {
state.info = null;
state.hasLogin = false;
uni.setStorageSync('userInfo', null);
}
},
actions = {
}
export default {
state,
getters,
mutations,
actions
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册