更新部分公共样式代码

This commit is contained in:
2024-09-28 15:05:30 +08:00
parent 789557183f
commit c3d4f1d78c
3 changed files with 68 additions and 1 deletions

View File

@@ -79,7 +79,27 @@ const model = {
return appCache.shopId
}
},
// 获取和放置useType就餐类型
useType: (val, isDelete = false) => {
if (isDelete) {
appCache.useType = ""
return uni.removeStorageSync('useType')
}
if (val) {
// 有值,为放置
appCache.useType = val
uni.setStorageSync('useType', val)
} else {
// 否则为获取
if (!appCache.useType) {
//缓存取不到,获取应用本地信息
appCache.useType = uni.getStorageSync('useType')
}
return appCache.useType
}
},
// 已经登录的用户记录
loggedInUser: (addUserName = null, removeUserName = null) => {
let key = "loggedInUserList"