From 5be40135c3cf05cd44efc06d381bb4e1a7d6918d Mon Sep 17 00:00:00 2001 From: tangping Date: Tue, 6 Jun 2023 09:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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