bugfix: date写错成data, 导致重新加载onLoad出错

This commit is contained in:
jqtmviyu@gmail.com 2021-02-25 17:24:16 +08:00
parent 0fa30a96b9
commit 5d7afeebd6

View File

@ -51,7 +51,7 @@ export default {
const cate = uni.getStorageSync("categories") const cate = uni.getStorageSync("categories")
if(cate){ if(cate){
// 10, // 10,
if(Data.now() - cate.time > 1000 * 10){ if(Date.now() - cate.time > 1000 * 10){
message = (await this.$u.api.getCategories()).message message = (await this.$u.api.getCategories()).message
uni.setStorageSync("categories", { time: Date.now(), list: message }); uni.setStorageSync("categories", { time: Date.now(), list: message });
}else { }else {