<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>购物商城DEMO</title>
<link rel="stylesheet" type="text/css" href="third-part/themes/dark/common.css"/>
<link rel="stylesheet" type="text/css" href="third-part/themes/dark/layout.css"/>
<script type="text/javascript" src="third-part/lib/jquery.min.js"></script>
<script type="text/javascript" src="third-part/lib/plugin/zzkf/jquery.levelmenu.js"></script>
</head>
<body class="overhide">
<div id="lc" class="f-left bgc03 ls01 lc06">
<div class="logo">
<div class="tz16 tc02 logotitle f-left" style="overflow-x: hidden;max-width: 150px;">购物平台DEMO</div>
</div>
<div class="menu bgc02" id="levelmenu">
<div class="ui-levelmenu-homemenu">
<span class="ui-levelmenu-homemenu-title"><span class="ui-levelmenu-title-name">网站导航</span></span>
</div>
<div>
<ul>
<!--====================功能菜单内容====================-->
<li class="ui-levelmenu-group">
<div class="ui-levelmenu-menuhome ui-levelmenu-title1">
<span class="ui-levelmenu-menuhome-title fa fa-codepen"></span><span class="ui-levelmenu-menuhome-title-name">购物中心</span>
</div>
<div class="ui-levelmenu-group-detail">
<ul class="ui-levelmenu-menu">
<li class="ui-levelmenu-menuitem" data-code="platdesc" data-url="bmplat/desc/goods.html">
<span class="ui-levelmenu-title-name">商品管理</span></li>
<li class="ui-levelmenu-menuitem" data-code="svnproject" data-url="bmplat/desc/order.html">
<span class="ui-levelmenu-title-name">订单管理</span></li>
</ul>
</div>
</li>
<!--====================end功能菜单内容====================-->
</ul>
</div>
</div>
</div>
<!--右侧工具栏-->
<div id="rc">
<div class="toolbar bgc03">
<div class="f-right userinfo">
<div class="f-right username">
<span class="tc02 lineblock nickname">欢迎您:</span>
<span class="tc09 tz14 lineblock nickname" id="nickname"></span>
</div>
</div>
</div>
<!--主内容区-->
<div class="bdcontainer">
<iframe id="content_frame" name="content_frame" src="" frameborder="0" border="0" style="margin:auto;" width="100%" height="100%"></iframe>
</div>
</div>
</body>
<script>
$(document).ready(function () {
initBdContainerSize();
initMenu();
getUserInfo();
/*初始化内容区大小*/
function initBdContainerSize(e, a) {
var paddingWidth = 5, bdcontainerWidth = $("#rc .toolbar").width() - paddingWidth * 2;
var $bdcontainer = $("#rc .bdcontainer");
$bdcontainer.css({padding: paddingWidth + "px 0px 0px " + paddingWidth + "px"});
$bdcontainer.width(bdcontainerWidth);
if (e != undefined) {
e._reSizeAllMenu();
}
}
function initMenu() {
var menuMaxWidth = 200, menuMinWidth = 40, $lc = $("#lc"), $rc = $("#rc");
var _mainMenu = $("#levelmenu").jLevelMenu({
menuMaxWidth: menuMaxWidth,
menuMinWidth: menuMinWidth,
allMenuWidthEle: $rc,
menuMinEvent: function (e) {
$lc.animate({width: menuMinWidth}, function () {
initBdContainerSize(e);
});
},
menuMaxEvent: function (e) {
$lc.animate({width: menuMaxWidth}, function () {
initBdContainerSize(e);
});
},
menuItemClickEvent: function (e) {
$("#content_frame").attr("src", $(e).attr("data-url"));
}
});
}
//查询当前登陆用户信息
function getUserInfo(){
$.ajax({
url: "http://localhost:18080/api/user/get_user_info",
data:null,
dataType: "json",
success: function(data){
if(data.status == 0){
$("#nickname").html(data.data.userName);
$("#nicknameId").html(data.data.uuid);
}else{
$.msgbox({type:"alert", content:"请求失败,请刷新!", autoClose:3});
}
}
});
}
});
</script>
</html>
- 1
- 2
前往页