改造后台权限和APP权限
This commit is contained in:
@@ -117,6 +117,21 @@
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function clearAppPermissionCaches() {
|
||||
try {
|
||||
var keysToRemove = [];
|
||||
for (var i = 0; i < localStorage.length; i++) {
|
||||
var key = localStorage.key(i);
|
||||
if (key && key.indexOf('app_column_permissions:') === 0) {
|
||||
keysToRemove.push(key);
|
||||
}
|
||||
}
|
||||
keysToRemove.forEach(function(key) {
|
||||
localStorage.removeItem(key);
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
(function() {
|
||||
fetch('/api/auth/check', { credentials: 'same-origin' })
|
||||
.then(function(r) { return r.json(); })
|
||||
@@ -142,6 +157,7 @@
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(res) {
|
||||
if (res.success) {
|
||||
clearAppPermissionCaches();
|
||||
window.location.href = res.redirect || '/home';
|
||||
} else {
|
||||
var errEl = document.querySelector('.error-msg');
|
||||
|
||||
Reference in New Issue
Block a user