liuhairui 2 tygodni temu
rodzic
commit
76866d15d1

+ 3 - 1
application/admin/controller/Index.php

@@ -97,7 +97,9 @@ class Index extends Backend
                 $this->error($validate->getError(), $url, ['token' => $this->request->token()]);
                 $this->error($validate->getError(), $url, ['token' => $this->request->token()]);
             }
             }
             AdminLog::setTitle(__('Login'));
             AdminLog::setTitle(__('Login'));
-            $result = $this->auth->login($username, $password, $keeplogin ? $keeyloginhours * 3600 : 0);
+            // 默认保持登录 72 小时(登录页无「记住我」勾选时也生效,避免频繁掉线)
+            $keeptime = $keeyloginhours * 3600;
+            $result = $this->auth->login($username, $password, $keeptime);
             if ($result === true) {
             if ($result === true) {
                 Hook::listen("admin_login_after", $this->request);
                 Hook::listen("admin_login_after", $this->request);
                 $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]);
                 $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]);

+ 3 - 3
application/admin/controller/Procuremen.php

@@ -80,12 +80,12 @@ class Procuremen extends Backend
         } else {
         } else {
             $path = '/' . ltrim($path, '/');
             $path = '/' . ltrim($path, '/');
         }
         }
-        $query = ['main_tab' => 'orders'];
+        // 邮件 HTML 中多参数链接常被邮箱客户端错误解析(& 后参数丢失),仅保留 focus_eid 单参数 + hash 备份
         if ($eid > 0) {
         if ($eid > 0) {
-            $query['focus_eid'] = $eid;
+            return $base . $path . '?focus_eid=' . $eid . '#mproc_fe=' . $eid;
         }
         }
 
 
-        return $base . $path . '?' . http_build_query($query, '', '&', PHP_QUERY_RFC3986);
+        return $base . $path . '?main_tab=orders';
     }
     }
 
 
     /**
     /**

+ 5 - 3
application/admin/library/Auth.php

@@ -106,9 +106,11 @@ class Auth extends \fast\Auth
                 return false;
                 return false;
             }
             }
             $ip = request()->ip();
             $ip = request()->ip();
-            //IP有变动
-            if ($admin->loginip != $ip) {
-                return false;
+            // IP 变动检测(与 isLogin 一致,受 fastadmin.loginip_check 控制)
+            if (Config::get('fastadmin.loginip_check')) {
+                if ($admin->loginip != $ip) {
+                    return false;
+                }
             }
             }
             Session::set("admin", $admin->toArray());
             Session::set("admin", $admin->toArray());
             Session::set("admin.safecode", $this->getEncryptSafecode($admin));
             Session::set("admin.safecode", $this->getEncryptSafecode($admin));

+ 5 - 0
application/common/controller/Backend.php

@@ -120,6 +120,11 @@ class Backend extends Controller
         $controllername = Loader::parseName($this->request->controller());
         $controllername = Loader::parseName($this->request->controller());
         $actionname = strtolower($this->request->action());
         $actionname = strtolower($this->request->action());
 
 
+        // 与后台「保持登录」时长一致,减少操作中 Session 过期被迫重新登录
+        if (PHP_VERSION_ID >= 70300) {
+            ini_set('session.gc_maxlifetime', '259200');
+        }
+
         $path = str_replace('.', '/', $controllername) . '/' . $actionname;
         $path = str_replace('.', '/', $controllername) . '/' . $actionname;
 
 
         // 定义是否Addtabs请求
         // 定义是否Addtabs请求

+ 1 - 1
application/config.php

@@ -278,7 +278,7 @@ return [
         //是否同一账号同一时间只能在一个地方登录
         //是否同一账号同一时间只能在一个地方登录
         'login_unique'          => false,
         'login_unique'          => false,
         //是否开启IP变动检测
         //是否开启IP变动检测
-        'loginip_check'         => true,
+        'loginip_check'         => false,
         //登录页默认背景图
         //登录页默认背景图
         'login_background'      => "",
         'login_background'      => "",
         //是否启用多级菜单导航
         //是否启用多级菜单导航

+ 104 - 16
application/index/controller/Index.php

@@ -39,6 +39,10 @@ class Index extends Frontend
         $days = (int)(Config::get('mproc.session_days') ?: 7);
         $days = (int)(Config::get('mproc.session_days') ?: 7);
         $days = max(1, min(30, $days));
         $days = max(1, min(30, $days));
         $this->mprocTtlSeconds = $days * 86400;
         $this->mprocTtlSeconds = $days * 86400;
+        if (PHP_VERSION_ID >= 70300) {
+            ini_set('session.cookie_lifetime', (string)$this->mprocTtlSeconds);
+            ini_set('session.gc_maxlifetime', (string)$this->mprocTtlSeconds);
+        }
     }
     }
 
 
     /**
     /**
@@ -401,28 +405,80 @@ class Index extends Frontend
         return $s;
         return $s;
     }
     }
 
 
+    protected function mprocRememberFocusEid(int $focusEid): void
+    {
+        if ($focusEid > 0) {
+            Session::set('mproc_focus_eid', $focusEid);
+        }
+    }
+
+    protected function mprocPullSessionFocusEid(): int
+    {
+        $fe = (int)Session::get('mproc_focus_eid', 0);
+        if ($fe > 0) {
+            Session::delete('mproc_focus_eid');
+        }
+
+        return $fe;
+    }
+
     /**
     /**
-     * 从请求中读取短信/邮件直达明细 ID(兼容 query、pathinfo、REQUEST_URI)
+     * 从 URI/query 中解析 focus_eid(兼容邮件客户端把 &focus_eid 拼进上一参数值的情况)
+     */
+    protected function mprocParseFocusEidFromUriString(string $uri): int
+    {
+        if ($uri === '' || stripos($uri, 'focus_eid') === false) {
+            return 0;
+        }
+        if (preg_match('/(?:[?&;]|%26)(?:amp;)*focus_eid=(\d+)/i', $uri, $m)) {
+            return (int)$m[1];
+        }
+        $query = parse_url($uri, PHP_URL_QUERY);
+        if (!is_string($query) || $query === '') {
+            return 0;
+        }
+        $q = [];
+        parse_str($query, $q);
+        if (!is_array($q)) {
+            return 0;
+        }
+        if (isset($q['focus_eid'])) {
+            $fe = (int)$q['focus_eid'];
+            if ($fe > 0) {
+                return $fe;
+            }
+        }
+        foreach ($q as $k => $v) {
+            $blob = (is_string($k) ? $k : '') . '=' . (is_scalar($v) ? (string)$v : '');
+            if (preg_match('/(?:^|[?&;]|%26)(?:amp;)*focus_eid=(\d+)/i', $blob, $m2)) {
+                return (int)$m2[1];
+            }
+        }
+
+        return 0;
+    }
+
+    /**
+     * 从请求中读取短信/邮件直达明细 ID(兼容 query、pathinfo、REQUEST_URI、登录回跳 Session)
      */
      */
     protected function mprocReadFocusEidFromRequest(): int
     protected function mprocReadFocusEidFromRequest(): int
     {
     {
         $fe = (int)$this->request->param('focus_eid', 0);
         $fe = (int)$this->request->param('focus_eid', 0);
         if ($fe > 0) {
         if ($fe > 0) {
+            $this->mprocRememberFocusEid($fe);
+
             return $fe;
             return $fe;
         }
         }
         $uri = isset($_SERVER['REQUEST_URI']) ? (string)$_SERVER['REQUEST_URI'] : '';
         $uri = isset($_SERVER['REQUEST_URI']) ? (string)$_SERVER['REQUEST_URI'] : '';
-        if ($uri !== '' && stripos($uri, 'focus_eid') !== false) {
-            $query = parse_url($uri, PHP_URL_QUERY);
-            if (is_string($query) && $query !== '') {
-                $q = [];
-                parse_str($query, $q);
-                if (is_array($q)) {
-                    $fe = (int)($q['focus_eid'] ?? 0);
-                    if ($fe > 0) {
-                        return $fe;
-                    }
-                }
-            }
+        $fe = $this->mprocParseFocusEidFromUriString($uri);
+        if ($fe > 0) {
+            $this->mprocRememberFocusEid($fe);
+
+            return $fe;
+        }
+        $fe = (int)Session::get('mproc_focus_eid', 0);
+        if ($fe > 0) {
+            return $fe;
         }
         }
 
 
         return 0;
         return 0;
@@ -475,11 +531,19 @@ class Index extends Frontend
             }
             }
         }
         }
         $allowed = [];
         $allowed = [];
+        $fe = 0;
         if (isset($q['focus_eid'])) {
         if (isset($q['focus_eid'])) {
             $fe = (int)$q['focus_eid'];
             $fe = (int)$q['focus_eid'];
-            if ($fe > 0) {
-                $allowed['focus_eid'] = $fe;
-            }
+        }
+        if ($fe <= 0) {
+            $fe = $this->mprocParseFocusEidFromUriString($raw);
+        }
+        if ($fe <= 0) {
+            $fe = (int)Session::get('mproc_focus_eid', 0);
+        }
+        if ($fe > 0) {
+            $allowed['focus_eid'] = $fe;
+            $this->mprocRememberFocusEid($fe);
         }
         }
         $mt = isset($q['main_tab']) ? trim((string)$q['main_tab']) : '';
         $mt = isset($q['main_tab']) ? trim((string)$q['main_tab']) : '';
         if ($mt === 'me' || $mt === 'orders') {
         if ($mt === 'me' || $mt === 'orders') {
@@ -497,6 +561,21 @@ class Index extends Frontend
         }
         }
         $base = rtrim($this->request->root(true), '/');
         $base = rtrim($this->request->root(true), '/');
         $path = '/index/index/index';
         $path = '/index/index/index';
+        if (isset($allowed['focus_eid']) && (int)$allowed['focus_eid'] > 0 && !isset($allowed['q'])) {
+            $fe = (int)$allowed['focus_eid'];
+            if (!isset($allowed['tab']) && (!isset($allowed['main_tab']) || $allowed['main_tab'] === 'orders')) {
+                return $base . $path . '?focus_eid=' . $fe . '#mproc_fe=' . $fe;
+            }
+            $ordered = ['focus_eid' => $fe];
+            if (isset($allowed['tab'])) {
+                $ordered['tab'] = $allowed['tab'];
+            }
+            if (isset($allowed['main_tab'])) {
+                $ordered['main_tab'] = $allowed['main_tab'];
+            }
+
+            return $base . $path . '?' . http_build_query($ordered, '', '&', PHP_QUERY_RFC3986) . '#mproc_fe=' . $fe;
+        }
         $qs = $allowed !== [] ? ('?' . http_build_query($allowed, '', '&', PHP_QUERY_RFC3986)) : '';
         $qs = $allowed !== [] ? ('?' . http_build_query($allowed, '', '&', PHP_QUERY_RFC3986)) : '';
 
 
         return $base . $path . $qs;
         return $base . $path . $qs;
@@ -1572,8 +1651,15 @@ class Index extends Frontend
     {
     {
         $user = $this->mprocGetUser();
         $user = $this->mprocGetUser();
         if (!$user) {
         if (!$user) {
+            $pendingFocus = $this->mprocReadFocusEidFromRequest();
+            if ($pendingFocus > 0) {
+                $this->mprocRememberFocusEid($pendingFocus);
+            }
             $uri = isset($_SERVER['REQUEST_URI']) ? (string)$_SERVER['REQUEST_URI'] : '';
             $uri = isset($_SERVER['REQUEST_URI']) ? (string)$_SERVER['REQUEST_URI'] : '';
             $safe = $this->mprocSanitizeRedirectUrl($uri);
             $safe = $this->mprocSanitizeRedirectUrl($uri);
+            if ($safe !== '' && $pendingFocus > 0 && stripos($safe, 'focus_eid') === false) {
+                $safe .= (strpos($safe, '?') !== false ? '&' : '?') . 'focus_eid=' . $pendingFocus;
+            }
             if ($safe !== '') {
             if ($safe !== '') {
                 Session::set('mproc_intended_url', $safe);
                 Session::set('mproc_intended_url', $safe);
             }
             }
@@ -1647,6 +1733,8 @@ class Index extends Frontend
         $cid = (int)($user['customer_id'] ?? $user['customer_user_id'] ?? 0);
         $cid = (int)($user['customer_id'] ?? $user['customer_user_id'] ?? 0);
         $this->view->assign('mprocCanChangePwd', empty($user['is_admin']) && $cid > 0 ? 1 : 0);
         $this->view->assign('mprocCanChangePwd', empty($user['is_admin']) && $cid > 0 ? 1 : 0);
         $this->view->assign('mprocFocusEid', $mprocFocusEid);
         $this->view->assign('mprocFocusEid', $mprocFocusEid);
+        $this->view->assign('mprocBootstrapToken', trim((string)($user['token'] ?? '')));
+        $this->view->assign('mprocBootstrapKeepDays', max(1, (int)round($this->mprocTtlSeconds / 86400)));
 
 
         if ($mainTab === 'me') {
         if ($mainTab === 'me') {
             $this->view->assign('rows', []);
             $this->view->assign('rows', []);

+ 110 - 9
application/index/view/index/index.html

@@ -445,7 +445,7 @@
         try {
         try {
             var tok = localStorage.getItem('mproc_token');
             var tok = localStorage.getItem('mproc_token');
             var exp = parseInt(localStorage.getItem('mproc_token_exp'), 10) || 0;
             var exp = parseInt(localStorage.getItem('mproc_token_exp'), 10) || 0;
-            if (tok && exp && Date.now() <= exp) {
+            if (tok && (!exp || Date.now() <= exp)) {
                 h['X-Mproc-Token'] = tok;
                 h['X-Mproc-Token'] = tok;
             }
             }
         } catch (ignoreTok) {
         } catch (ignoreTok) {
@@ -485,36 +485,137 @@
                 mprocPersistLoginToken(ret);
                 mprocPersistLoginToken(ret);
                 return true;
                 return true;
             }
             }
-            mprocClearLoginToken();
+            var msg = ret && ret.msg ? String(ret.msg) : '';
+            if (/过期|重新登录|未登录|请先登录/i.test(msg)) {
+                mprocClearLoginToken();
+            }
             return false;
             return false;
         }).catch(function () {
         }).catch(function () {
             return false;
             return false;
         });
         });
     }
     }
 
 
+    /** 服务端已登录时,把 Cookie 中的 token 同步进 localStorage(邮箱/微信内置浏览器 Cookie 易丢) */
+    (function mprocBootstrapAuthFromServer() {
+        var srvTok = {:json_encode(isset($mprocBootstrapToken) ? $mprocBootstrapToken : '', JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)};
+        var keepDays = {:json_encode(isset($mprocBootstrapKeepDays) ? (int)$mprocBootstrapKeepDays : 7, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)};
+        if (!srvTok) {
+            return;
+        }
+        mprocPersistLoginToken({
+            code: 1,
+            data: {
+                mproc_token: srvTok,
+                keep_days: keepDays
+            }
+        });
+    })();
+
     var boot = {:json_encode(['main_tab' => $mprocMainTab, 'tab' => $mprocTab, 'q' => $mprocSearchQ, 'is_admin' => $mprocIsAdmin, 'can_change_pwd' => isset($mprocCanChangePwd) ? (int)$mprocCanChangePwd : 0, 'focus_eid' => isset($mprocFocusEid) ? (int)$mprocFocusEid : 0], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)};
     var boot = {:json_encode(['main_tab' => $mprocMainTab, 'tab' => $mprocTab, 'q' => $mprocSearchQ, 'is_admin' => $mprocIsAdmin, 'can_change_pwd' => isset($mprocCanChangePwd) ? (int)$mprocCanChangePwd : 0, 'focus_eid' => isset($mprocFocusEid) ? (int)$mprocFocusEid : 0], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)};
     var changePwdUrl = mprocEndpointUrl('mprocChangePwd.html');
     var changePwdUrl = mprocEndpointUrl('mprocChangePwd.html');
     var currentMain = boot.main_tab === 'me' ? 'me' : 'orders';
     var currentMain = boot.main_tab === 'me' ? 'me' : 'orders';
     var currentListTab = boot.tab && ['draft', 'submitted', 'done'].indexOf(boot.tab) !== -1 ? boot.tab : 'draft';
     var currentListTab = boot.tab && ['draft', 'submitted', 'done'].indexOf(boot.tab) !== -1 ? boot.tab : 'draft';
 
 
-    /** 短信/邮件链接中的 focus_eid:优先 boot,其次当前 URL */
+    /** 短信/邮件链接中的 focus_eid:boot / URL / hash / sessionStorage(邮箱客户端常丢 query) */
+    function mprocPersistFocusEid(eid) {
+        if (!eid) {
+            return;
+        }
+        try {
+            sessionStorage.setItem('mproc_focus_eid', String(eid));
+        } catch (ignoreStore) {
+        }
+    }
+
+    function mprocParseFocusEidFromSearch(search) {
+        var fe = 0;
+        if (!search) {
+            return 0;
+        }
+        try {
+            var sp = new URLSearchParams(search.charAt(0) === '?' ? search.substring(1) : search);
+            fe = parseInt(sp.get('focus_eid'), 10) || 0;
+            if (fe > 0) {
+                return fe;
+            }
+            sp.forEach(function (val) {
+                if (fe > 0) {
+                    return;
+                }
+                var m = String(val).match(/(?:^|[?&;])(?:amp;)*focus_eid=(\d+)/i);
+                if (m) {
+                    fe = parseInt(m[1], 10) || 0;
+                }
+            });
+        } catch (ignoreSp) {
+        }
+        return fe;
+    }
+
+    function mprocParseFocusEidFromHash(hash) {
+        if (!hash) {
+            return 0;
+        }
+        var hm = String(hash).match(/(?:^#)?(?:mproc_fe=|focus_eid=)(\d+)/i);
+        return hm ? (parseInt(hm[1], 10) || 0) : 0;
+    }
+
     function mprocGetFocusEid() {
     function mprocGetFocusEid() {
-        var fromBoot = parseInt(boot.focus_eid, 10) || 0;
-        if (fromBoot > 0) {
-            return fromBoot;
+        var fe = parseInt(boot.focus_eid, 10) || 0;
+        if (fe > 0) {
+            mprocPersistFocusEid(fe);
+            return fe;
         }
         }
         try {
         try {
-            var sp = new URLSearchParams(window.location.search);
-            var fe = parseInt(sp.get('focus_eid'), 10) || 0;
+            fe = mprocParseFocusEidFromSearch(window.location.search);
+            if (fe > 0) {
+                boot.focus_eid = fe;
+                mprocPersistFocusEid(fe);
+                return fe;
+            }
+            fe = mprocParseFocusEidFromHash(window.location.hash);
+            if (fe > 0) {
+                boot.focus_eid = fe;
+                mprocPersistFocusEid(fe);
+                return fe;
+            }
+            fe = parseInt(sessionStorage.getItem('mproc_focus_eid'), 10) || 0;
             if (fe > 0) {
             if (fe > 0) {
                 boot.focus_eid = fe;
                 boot.focus_eid = fe;
                 return fe;
                 return fe;
             }
             }
-        } catch (ignoreUrl) {
+        } catch (ignoreRead) {
         }
         }
         return 0;
         return 0;
     }
     }
 
 
+    /** 邮箱内打开时 query 可能丢失但 hash 仍在:补全地址让服务端也能定位到正确 Tab */
+    function mprocRepairFocusUrlIfNeeded() {
+        var fe = mprocParseFocusEidFromHash(window.location.hash);
+        if (fe <= 0) {
+            fe = mprocParseFocusEidFromSearch(window.location.search);
+        }
+        if (fe <= 0) {
+            return false;
+        }
+        mprocPersistFocusEid(fe);
+        boot.focus_eid = fe;
+        var qs = window.location.search || '';
+        if (/(?:^|[?&])focus_eid=\d+/.test(qs)) {
+            return false;
+        }
+        var target = window.location.pathname + '?focus_eid=' + fe + '#mproc_fe=' + fe;
+        if (target !== window.location.pathname + window.location.search + window.location.hash) {
+            location.replace(target);
+            return true;
+        }
+        return false;
+    }
+
+    if (mprocRepairFocusUrlIfNeeded()) {
+        return;
+    }
+
     var tabbar = document.getElementById('mproc-tabbar');
     var tabbar = document.getElementById('mproc-tabbar');
     var paneOrders = document.getElementById('mproc-pane-orders');
     var paneOrders = document.getElementById('mproc-pane-orders');
     var paneMe = document.getElementById('mproc-pane-me');
     var paneMe = document.getElementById('mproc-pane-me');

+ 39 - 13
application/index/view/index/login.html

@@ -264,28 +264,45 @@
         if (!redir) {
         if (!redir) {
             return 0;
             return 0;
         }
         }
+        var fe = 0;
         try {
         try {
-            var qIdx = String(redir).indexOf('?');
-            if (qIdx < 0) {
-                return 0;
+            var s = String(redir);
+            var qIdx = s.indexOf('?');
+            if (qIdx >= 0) {
+                fe = parseInt(new URLSearchParams(s.substring(qIdx + 1)).get('focus_eid'), 10) || 0;
+            }
+            if (fe <= 0) {
+                var m = s.match(/(?:[?&;]|%26)(?:amp;)*focus_eid=(\d+)/i);
+                if (m) {
+                    fe = parseInt(m[1], 10) || 0;
+                }
             }
             }
-            var sp = new URLSearchParams(String(redir).substring(qIdx + 1));
-            return parseInt(sp.get('focus_eid'), 10) || 0;
         } catch (ignoreParse) {
         } catch (ignoreParse) {
-            return 0;
+            fe = 0;
+        }
+        if (fe <= 0) {
+            try {
+                fe = parseInt(sessionStorage.getItem('mproc_focus_eid'), 10) || 0;
+            } catch (ignoreSs) {
+                fe = 0;
+            }
         }
         }
+        return fe;
     }
     }
 
 
     function mprocEnsureUrlHasFocusEid(url, redir) {
     function mprocEnsureUrlHasFocusEid(url, redir) {
-        if (!url || /(?:\?|&)focus_eid=\d+/.test(url)) {
+        if (!url) {
+            return url;
+        }
+        if (/(?:\?|#)(?:mproc_fe=|focus_eid=)\d+/.test(url)) {
             return url;
             return url;
         }
         }
         var fe = mprocExtractFocusEidFromRedirect(redir);
         var fe = mprocExtractFocusEidFromRedirect(redir);
         if (fe <= 0) {
         if (fe <= 0) {
             return url;
             return url;
         }
         }
-        var sep = url.indexOf('?') >= 0 ? '&' : '?';
-        return url + sep + 'focus_eid=' + encodeURIComponent(String(fe)) + '&main_tab=orders';
+        var base = url.split('#')[0].split('?')[0];
+        return base + '?focus_eid=' + encodeURIComponent(String(fe)) + '#mproc_fe=' + fe;
     }
     }
 
 
     function goHome(ret) {
     function goHome(ret) {
@@ -300,6 +317,12 @@
             }
             }
             var jump = ret.url || indexUrl;
             var jump = ret.url || indexUrl;
             jump = mprocEnsureUrlHasFocusEid(jump, loginRedirect);
             jump = mprocEnsureUrlHasFocusEid(jump, loginRedirect);
+            var feJump = mprocExtractFocusEidFromRedirect(jump) || mprocExtractFocusEidFromRedirect(loginRedirect);
+            if (feJump > 0) {
+                try {
+                    sessionStorage.setItem('mproc_focus_eid', String(feJump));
+                } catch (ignoreSs) {}
+            }
             location.href = jump;
             location.href = jump;
         } else {
         } else {
             showToast(ret && ret.msg ? ret.msg : '登录失败', 'err');
             showToast(ret && ret.msg ? ret.msg : '登录失败', 'err');
@@ -490,10 +513,13 @@
             if ($btnLoginPwd) {
             if ($btnLoginPwd) {
                 $btnLoginPwd.disabled = false;
                 $btnLoginPwd.disabled = false;
             }
             }
-            try {
-                localStorage.removeItem('mproc_token');
-                localStorage.removeItem('mproc_token_exp');
-            } catch (eDrop) {}
+            var msg = ret && ret.msg ? String(ret.msg) : '';
+            if (/过期|重新登录|未登录|请先登录/i.test(msg)) {
+                try {
+                    localStorage.removeItem('mproc_token');
+                    localStorage.removeItem('mproc_token_exp');
+                } catch (eDrop) {}
+            }
         }).catch(function () {
         }).catch(function () {
             setSubmitBusy($btnLogin, false);
             setSubmitBusy($btnLogin, false);
             if ($btnLoginPwd) {
             if ($btnLoginPwd) {