Browse Source

修复后台首页Cookie限制path

Karson 3 years ago
parent
commit
12ea49d937
1 changed files with 2 additions and 1 deletions
  1. 2 1
      public/assets/js/backend/index.js

+ 2 - 1
public/assets/js/backend/index.js

@@ -240,7 +240,8 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
             var createCookie = function (name, value) {
                 var date = new Date();
                 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
-                document.cookie = encodeURIComponent(Config.cookie.prefix + name) + "=" + encodeURIComponent(value) + "; expires=" + date.toGMTString();
+                var path = Fast.api.fixurl('index/index');
+                document.cookie = encodeURIComponent(Config.cookie.prefix + name) + "=" + encodeURIComponent(value) + "; " + path + "; expires=" + date.toGMTString();
             };
 
             var my_skins = [