Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 3 years ago
parent
commit
f4c3705833
  1. 2
      package.json
  2. 4
      src/core/structure/cache.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20220223195238",
"version": "2.0.20220224171319",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

4
src/core/structure/cache.js

@ -47,7 +47,7 @@ BI.Cache = {
},
addCookie: function (name, value, path, expiresHours) {
var cookieString = name + "=" + escape(value);
var cookieString = name + "=" + encodeURI(value);
// 判断是否设置过期时间
if (expiresHours && expiresHours > 0) {
var date = new Date();
@ -62,7 +62,7 @@ BI.Cache = {
},
getCookie: function (name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg)) {return unescape(arr[2]);}
if (arr = document.cookie.match(reg)) {return decodeURI(arr[2]);}
return null;
},
deleteCookie: function (name, path) {

Loading…
Cancel
Save