bugfix: date写错成data, 导致重新加载onLoad出错
This commit is contained in:
parent
0fa30a96b9
commit
5d7afeebd6
@ -51,7 +51,7 @@ export default {
|
||||
const cate = uni.getStorageSync("categories")
|
||||
if(cate){
|
||||
// 数据超过10秒, 从新从接口拿数据并更新到本地
|
||||
if(Data.now() - cate.time > 1000 * 10){
|
||||
if(Date.now() - cate.time > 1000 * 10){
|
||||
message = (await this.$u.api.getCategories()).message
|
||||
uni.setStorageSync("categories", { time: Date.now(), list: message });
|
||||
}else {
|
||||
|
Loading…
Reference in New Issue
Block a user