最近遇到好多次本地存储突然清空的情况,很大概率排除了自身业务代码的原因,于是开始在代码中加入了部分log来记录此类问题,以下是2个案例,(数据记录的分别是wx.getSystemInfoSync()和wx.getStorageInfoSync()获取的数据)发现limitSize: 0 (正常不应该是10240么)
案例1
{“screenWidth”:360,“pixelRatio”:3,“system”:“Android 5.1”,“benchmarkLevel”:7,“windowWidth”:360,“brand”:“Meizu”,“screenHeight”:640,“version”:“6.6.6”,“fontSizeSetting”:16,“language”:“zh_CN”,“windowHeight”:570,“model”:“m3 note”,“platform”:“android”,“SDKVersion”:“2.0.9”}
{“keys”:[],“currentSize”:0,“limitSize”:0}
案例2
{“screenWidth”:360,“benchmarkLevel”:8,“windowHeight”:608,“screenHeight”:680,“language”:“zh_CN”,“version”:“6.6.7”,“system”:“Android 8.0.0”,“fontSizeSetting”:18,“pixelRatio”:3,“model”:“HWI-AL00”,“statusBarHeight”:24,“brand”:“HUAWEI”,“windowWidth”:360,“platform”:“android”,“SDKVersion”:“2.0.9”}
{“limitSize”:0,“keys”:[],“currentSize”:0}