index.html
2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!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> | <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>