From 7d3d2dcd8d9c123e0720ad002a2c2bcd24961cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=8A=E9=87=8C?= <1227971437@qq.com> Date: Fri, 9 Apr 2021 17:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- store/modules/theme.js | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 store/modules/theme.js diff --git a/store/modules/theme.js b/store/modules/theme.js deleted file mode 100644 index 30bf176..0000000 --- a/store/modules/theme.js +++ /dev/null @@ -1,42 +0,0 @@ -// 上次启动时的用户信息 -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 -} -- GitLab