增加代客下单商品列表缓存
This commit is contained in:
parent
3549664a0f
commit
e0c008732e
|
|
@ -126,6 +126,27 @@ const model = {
|
|||
return appCache.useType
|
||||
}
|
||||
},
|
||||
// 缓存代客下单商品
|
||||
cacheGoods: (val, isDelete = false) => {
|
||||
if (isDelete) {
|
||||
appCache.cacheGoods = ""
|
||||
return uni.removeStorageSync('cacheGoods')
|
||||
}
|
||||
|
||||
if (val) {
|
||||
// 有值,为放置
|
||||
appCache.cacheGoods = val
|
||||
uni.setStorageSync('cacheGoods', val)
|
||||
} else {
|
||||
// 否则为获取
|
||||
|
||||
if (!appCache.cacheGoods) {
|
||||
//缓存取不到,获取应用本地信息
|
||||
appCache.cacheGoods = uni.getStorageSync('cacheGoods')
|
||||
}
|
||||
return appCache.cacheGoods
|
||||
}
|
||||
},
|
||||
// 已经登录的用户记录
|
||||
loggedInUser: (addUserName = null, removeUserName = null) => {
|
||||
let key = "loggedInUserList"
|
||||
|
|
|
|||
Loading…
Reference in New Issue