v0.3.7: 恢复前端Vue源码 + 修复AdminDashboard 401根源
This commit is contained in:
15
source_clean/frontend.bak.old/admin/js/admin-boot.js
Normal file
15
source_clean/frontend.bak.old/admin/js/admin-boot.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
// Fetch app version
|
||||
fetch('/api/version').then(r => r.json()).then(d => {
|
||||
var el = document.getElementById('appVersion');
|
||||
if (el && d.version) el.textContent = 'v' + d.version;
|
||||
}).catch(function(){});
|
||||
|
||||
(function(){
|
||||
if(!TOKEN){
|
||||
document.getElementById('app').innerHTML = '<div class="login-wrap"><div id="content"></div></div>';
|
||||
page_login(document.getElementById('content'));
|
||||
} else {
|
||||
nav('dashboard');
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user