Parcourir la source

fix(cache):修复缓存错误

Tim_Walker il y a 2 ans
Parent
commit
25dd9f51a1
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/utils/cache.js

+ 2 - 0
src/utils/cache.js

@@ -16,6 +16,8 @@ function setCache(key, value) {
     };
   } else {
     param = uni.getStorageSync(key);
+    param.type = typeof value;
+    param.value = value;
     param.updateTime = dayjs().format('YYYY/MM/DD HH:mm:ss');
   }
   uni.setStorageSync(key, param);