diff --git a/src/platforms/app-plus/service/api/storage/storage.js b/src/platforms/app-plus/service/api/storage/storage.js index ad0d87cdb905eb8713ef034fc46edf4e0d1d410f..b7e9b1590e130980d3499c30996b9de478356ead 100644 --- a/src/platforms/app-plus/service/api/storage/storage.js +++ b/src/platforms/app-plus/service/api/storage/storage.js @@ -93,8 +93,12 @@ function parseGetStorage (type, value) { data = object if (typeof object === 'string') { object = JSON.parse(object) - // eslint-disable-next-line valid-typeof - data = typeof object === (type === 'null' ? 'object' : type) ? object : data + const objectType = typeof object + if (objectType === 'number' && type === 'date') { + data = new Date(object) + } else if (objectType === (['null', 'array'].indexOf(type) < 0 ? type : 'object')) { + data = object + } } } } catch (error) {}