diff --git a/src/utils/storage.js b/src/utils/storage.js index 3debfe8..a537892 100644 --- a/src/utils/storage.js +++ b/src/utils/storage.js @@ -45,14 +45,14 @@ export function SetAsyncData(key, data, t = 0) { export function GetData(key) { let storage = Taro.getStorageSync(key) if (!storage) { - return {} + return null } if (storage.expire > 0) { let time = (new Date()).getTime() time = Number(String(time).substr(0, 10)) if (time > storage.expire) { DelData(key) - return {} + return null } } return storage._data