-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问小程序里 如何将自定义数组(类似hashmap)保存至本地缓存 JSON.stringify 不行 #9
Comments
如果数据里不包含正则、函数等非JSON类型,JSON.stringify是可以的,请问报什么错? |
不报错 就是存不进去,我已换了写法搞定了 |
方便发下两种使用方式?是用$cache接口吗? |
没有看出问题,tempGoodsArray 应该不是一个数组吧,如果没有挂一些非基本类型的实例字段,也不会有问题,或许你可以尝试下 JSON.stringify(tempGoodsArray) 会报什么错 |
没报错,那拿到的值是什么呢? |
拿到的是一个空数组 list = [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: