index.html 2.98 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset='UTF-8' />
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout" id="ff" data-options="fit:false">
	<div region="north" style="height: 73px; border-style: none; overflow: hidden;">
		<div id="top">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="top_table">
				<tr>
					<td width="220" height="69" rowspan="2">
						<div align="center">
							<img src="/ufoPlatform/images/name.png" width="100" height="60" />
						</div>
					</td>
					<td height="26" valign="middle" class="top_bg01">
						<div align="right" style="margin-right: 100px">
							你好,<span id="userName"></span>&nbsp;&nbsp; |&nbsp; <a href="#" id="logout">注销</a>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div region="west" iconCls="icon-reload" split="true" style="width: 280px;" id="left">
		
	</div>
	<div region="center">
		<div id="right">
			<div title="首页" id="homePage"></div>
		</div>
	</div>
	<script>
		$(function() {
			
			//获取老平台地址
			$.post(contextPath + "/loginController/getPortalUrl.do", function(data) {
				adminPortalUrl = data.data;
			});
			
			//注销
			$("#logout").linkbutton({
				plain : true,
				iconCls : 'icon-cancel',
				onClick : function() {
					$.messager.confirm('确认', '你确定要注销登录吗?', function(f) {
						if (!f) {
							return;
						}
						$.post(contextPath + "/loginController/logout.do", function(data) {
							window.location.href = "/platform/html/login.html";
						});
						
					});
				}
			});

			//显示登录用户名
			$.post(contextPath + "/loginController/getLoginUserInfo.do", function(data) {
				data = defaultLoadFilter(data);
				$("#userName").html(data.truename);
			});
			
			$("#left").load(contextPath + "/html/index/leftMenu.html");
			
			//tab页显示
			$("#right").myTabs({
				fit : true,
				maxSizeAble : true
			});
		});
		
		//打开页面
		function addTab(item) {
			if (item.menu_url.indexOf(".html") >= 0) {
				//新的页面
				if ($("#right").tabs("exists", item.menu_name)) {
					$("#right").tabs("select", item.menu_name);
				} else {
					var iframeId = "iframe_" + item.id;
					var iframe = $("<iframe>").attr({
						width : "100%",
						height : "100%",
						frameborder : 0,
						id : iframeId
					});
					if (item.menu_url.indexOf("?") > 0) {
						iframe.attr("src", contextPath + item.menu_url + "&menuId=" + item.id + "&iframeId=" + iframeId);
					} else {
						iframe.attr("src", contextPath + item.menu_url + "?menuId=" + item.id + "&iframeId=" + iframeId);
					}
					$("#right").tabs("add", {
						title : item.menu_name,
						content : iframe,
						closable : true,
						selected : true,
						cache : true
					});
				}
			} else {
				//老页面
				window.open(adminPortalUrl + item.menu_url);
			}
		}
	</script>
</body>
</html>