【优化】优化验证本地是否存在缓存用户数据的判断规则

This commit is contained in:
大灰灰
2023-01-04 03:10:26 +08:00
parent b6890d50f0
commit 57fd7516dc

View File

@@ -196,8 +196,7 @@
// #ifdef MP-WEIXIN
var userInfo = this.$store.state.userInfo;
//var token = this.$db.get('userToken');
//if (Object.keys(userInfo).length != 0) {
if (userInfo) {
if (Object.keys(userInfo).length != 0) {
//console.log("获取到store.state用户数据");
} else {
_this.$store.commit('userInfo', "");