当 localstorage 或 sessionstorage 存储布尔值数据时,取到的数据变成了字符串’true’ ‘false’。
    建议在存储该类型数据时将 value 设置为 0、1,取值时用Number(localstorage.getItem(‘key’)),再进行后续判断操作。