function initbody(){
objcont = $('#content_allmainview');
objtabs = $('#tabs_title');
menubadge = hongbadge = menutopid = {};//角标数组
resizewh();
$(window).resize(resizewh);
clickhome();
if(show_key!='')jm.setJmstr(jm.base64decode(show_key));
var a = $("li[pmenuid]");
a.click(function(){
if(js.ajaxbool)return;
a.removeClass();
loadmenu(this);
});
loadmenu($("li[pmenuid]")[0]);
if(typeof(FormData)=='undefined'){
js.msg('msg','您的浏览器太低了无法达到想要的预览效果
建议使用IE10+,Firefox,Chrome等高级点的',60);
}
if(get('indexuserl')){
var ddsata=[{
name:' 个人设置',num:'grcog','icon':'cog',url:'system,geren,cog',names:'个人设置'
},{
name:' 提醒信息',num:'todo','icon':'bell',url:'system,geren,todo',names:'提醒信息'
},{
name:' 修改头像',num:'face','icon':'picture'
},{
name:' 新版首页1',num:'jiu','icon':'laptop'
},{
name:' 新版首页2',num:'jiu2','icon':'laptop'
},{
name:' 帐号('+adminuser+')',num:'user'
}];
if(js.request('afrom')=='')ddsata.push({name:' 退出',num:'exit'});
$('#indexuserl').rockmenu({
width:150,top:get('topheaderid').offsetHeight,
data:ddsata,
itemsclick:function(d){
if(d.num=='exit'){
js.confirm('确定要退出系统吗?',function(bn){
if(bn=='yes')js.location('?m=login&a=exit');
});
return;
}
if(d.num=='face'){
editfacechang(adminid, adminname);
return;
}
if(d.num=='jiu'){
js.location('?a=home');
return;
}
if(d.num=='jiu2'){
js.location('?a=new');
return;
}
if(d.num=='user')return;
addtabs({num:d.num,url:d.url,name:d.names,icons:d.icon});
}
});
}
$('#reordershla').click(function(){
$('#indexmenu').hide();
$('#indexmenuss').show();
resizewh();
});
$('#indexmenuss').click(function(){
$('#indexmenu').show();
$('#indexmenuss').hide();
resizewh();
});
_addbodykey();
$('#indesearchmenu').click(function(){
_searchmenus();
});
function _loadjsurl(){
js.importjs('web/res/mode/echarts/echarts.common.min.js');
}
setTimeout(_loadjsurl,100);
//禁止后退
$(document.body).keydown(function(e){
var lxs = e.target.nodeName.toLowerCase();
var bo = (lxs=='input' || lxs=='textarea');
if(e.keyCode==8 && !bo)return false;
});
try{
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function (){
history.pushState(null, null, document.URL);
});
}catch(e){}
}
function _searchmenus(){
js.prompt('搜索菜单','请输入搜索菜单名:',function(jg,txt){
if(jg=='yes' && txt){
$('#menulisttop').html('搜索结果');
$('#menulist').html('