2017-11-13 12:26:31 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-CN">
|
2018-02-13 15:23:29 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
<meta http-equiv="Content-Language" content="zh-CN" />
|
|
|
|
|
<meta name="renderer" content="webkit" />
|
|
|
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no" />
|
|
|
|
|
|
2020-01-26 23:45:39 +08:00
|
|
|
|
<title>MCSM 管理面板</title>
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<link href="./common/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
|
2018-03-12 14:37:51 +08:00
|
|
|
|
<link href="common/css/action.css" rel="stylesheet" />
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<link href="./common/css/common.css" rel="stylesheet">
|
|
|
|
|
<link href="./common/css/block.css" rel="stylesheet">
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<link href="common/css/unit.css" rel="stylesheet" />
|
2018-01-18 11:00:54 +08:00
|
|
|
|
|
2020-03-02 14:24:04 +08:00
|
|
|
|
<link href="common/xterm.css" rel="stylesheet" />
|
|
|
|
|
<script type="text/javascript" src="common/xterm.js"></script>
|
|
|
|
|
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<link href="./favicon.ico" rel="shortcut icon">
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<!--[if lt IE 9]>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div id='Not_' class="show-ui" style="height: 40px;background-color: rgb(221,79,67);text-align:center;line-height: 40px;color: white;">
|
|
|
|
|
<b>无法访问! 您的浏览器版本过低或是兼容模式,请使用最新/更高版本的浏览器: IE10+ chrome FireFox 等,如果是国内浏览器请打开极速浏览模式(webkit内核)。</b>
|
|
|
|
|
</div>
|
|
|
|
|
<![endif]-->
|
|
|
|
|
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--前端完全开源,您可以进行任何自由更改! -->
|
|
|
|
|
<!--版权所有 Mcserver Manager 主要开发者 (Suwings) 双羽 -->
|
2018-01-18 11:00:54 +08:00
|
|
|
|
</head>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<!--百度数据统计,如果您不想被统计,请删除这段代码-->
|
|
|
|
|
<script>
|
|
|
|
|
var _hmt = _hmt || [];
|
|
|
|
|
(function () {
|
|
|
|
|
var hm = document.createElement("script");
|
|
|
|
|
hm.src = "https://hm.baidu.com/hm.js?242b21aa18712872e0775282aaeae0a5";
|
|
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
|
|
s.parentNode.insertBefore(hm, s);
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2017-11-20 20:09:51 +08:00
|
|
|
|
<!--
|
2017-11-13 12:26:31 +08:00
|
|
|
|
__ ___ __ ___
|
|
|
|
|
/ |/ /____________ ______ _____ _____ / |/ /___ _____ ____ _____ ____ _____
|
|
|
|
|
/ /|_/ / ___/ ___/ _ \/ ___/ | / / _ \/ ___/ / /|_/ / __ `/ __ \/ __ `/ __ `/ _ \/ ___/
|
|
|
|
|
/ / / / /__(__ ) __/ / | |/ / __/ / / / / / /_/ / / / / /_/ / /_/ / __/ /
|
|
|
|
|
/_/ /_/\___/____/\___/_/ |___/\___/_/ /_/ /_/\__,_/_/ /_/\__,_/\__, /\___/_/
|
|
|
|
|
/____/
|
|
|
|
|
Only you.
|
|
|
|
|
-->
|
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<body>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div id='MainContainer'>
|
2020-01-26 23:45:39 +08:00
|
|
|
|
<div id='SideCol'>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div id="SideColMenu">
|
2020-01-26 23:45:39 +08:00
|
|
|
|
<!-- logo -->
|
|
|
|
|
<div id='MasterLogo' class="HeaderItem" style="cursor: pointer;">
|
|
|
|
|
<img src="common/logo.png" width="160px" height="100%" />
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div id='SideColMenuInfo'>
|
|
|
|
|
Mcserver Manager
|
|
|
|
|
<br>
|
|
|
|
|
<div id='websocket2'>
|
2018-01-18 11:00:54 +08:00
|
|
|
|
<div v-if="is">
|
2019-09-16 15:39:49 +08:00
|
|
|
|
<span class="color-green">在线: </span>{{ MCSERVER.username }}</div>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div v-else>offline (离线)</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id='SideColFor'>
|
|
|
|
|
<!--如果您想更改菜单名或功能,请查看 common/js/meum.js 文件-->
|
2019-09-16 16:07:06 +08:00
|
|
|
|
<a href="javascript:void(0);" v-for="item of items" :class="{ MeumSelect: item.select }"
|
|
|
|
|
v-on:click="onRedirect(item.link,item.api,item)">
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<span class="glyphicon " :class="item.class" aria-hidden="true"></span>
|
|
|
|
|
<span v-text="item.name"></span>
|
|
|
|
|
</a>
|
2020-01-27 11:41:53 +08:00
|
|
|
|
|
2017-11-13 12:26:31 +08:00
|
|
|
|
</div>
|
2020-01-27 15:31:43 +08:00
|
|
|
|
<a href="javascript:void(0);" onclick="PAGE.refresh()">
|
|
|
|
|
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
|
|
|
|
<span>刷新</span>
|
|
|
|
|
</a>
|
2020-01-27 11:41:53 +08:00
|
|
|
|
<a id="loginOut" href="javascript:void(0);" v-on:click="loginOut()">
|
|
|
|
|
<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span>
|
|
|
|
|
<span>退出</span>
|
|
|
|
|
</a>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="Container">
|
2020-03-02 16:07:31 +08:00
|
|
|
|
<!-- 终端控制台 -->
|
|
|
|
|
<div id="WebTerminalScreenWapper" class="OneContainer" style="display: none;">
|
2020-03-02 16:56:57 +08:00
|
|
|
|
<div class="Panel PanelBlack ">
|
2020-03-02 16:07:31 +08:00
|
|
|
|
<div class="PanelTitle">实时终端控制台</div>
|
|
|
|
|
<div class="PanelBody">
|
|
|
|
|
<!-- 终端 -->
|
2020-03-02 16:56:57 +08:00
|
|
|
|
<div id="WebTerminal" class="WebTerminalScreen"></div>
|
2020-03-02 16:07:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<div id="ConsoleMain">
|
|
|
|
|
<!--可变动内嵌html区域开始-->
|
|
|
|
|
|
|
|
|
|
<!--默认的单页应用模板,这个是用于第一次加载时使用-->
|
|
|
|
|
<div class="OneContainer">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-xs-12">
|
2017-11-18 21:16:45 +08:00
|
|
|
|
<h3 id="_TMP_LOADING">请稍等,正在传输资源 ....</h3>
|
|
|
|
|
<script>
|
2018-01-18 11:00:54 +08:00
|
|
|
|
(function () {
|
2017-11-18 21:16:45 +08:00
|
|
|
|
var count = 0;
|
|
|
|
|
var www = document.getElementById('_TMP_LOADING');
|
2018-01-18 11:00:54 +08:00
|
|
|
|
var masks = setInterval(function () {
|
2017-11-18 21:16:45 +08:00
|
|
|
|
www.innerHTML = www.innerHTML + '.';
|
|
|
|
|
count++;
|
2018-01-18 11:00:54 +08:00
|
|
|
|
if (count > 10) clearInterval(masks);
|
|
|
|
|
}, 1000);
|
2017-11-18 21:16:45 +08:00
|
|
|
|
})();
|
|
|
|
|
</script>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!--可变动内嵌html区域结束-->
|
|
|
|
|
</div>
|
2020-03-02 14:24:04 +08:00
|
|
|
|
|
2020-03-02 16:07:31 +08:00
|
|
|
|
|
2017-11-13 12:26:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-03-02 16:07:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<!--信息框HTML-->
|
|
|
|
|
<div id='ToolsInfo'>
|
|
|
|
|
<transition name="fade">
|
|
|
|
|
<div class="ToolsInfo tools-info text-center show-ui" v-if='show' v-text="msg">
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-18 20:29:35 +08:00
|
|
|
|
<!--页面加载进度条-->
|
|
|
|
|
<div class="Toolscon" id="ToolsPageLoading">
|
2017-11-19 10:47:09 +08:00
|
|
|
|
<div class="progress" style="height: 4px;line-height: 4px;background-color: inherit;border: 0px;">
|
2019-09-16 15:25:35 +08:00
|
|
|
|
<div id="ToolsLoading" class="progress-bar progress-bar-success progress-bar-striped active"
|
|
|
|
|
style="width: 0%;height: 4px;">
|
2018-01-18 11:00:54 +08:00
|
|
|
|
</div>
|
2017-11-18 20:29:35 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-01-18 11:00:54 +08:00
|
|
|
|
|
2018-08-10 10:17:22 +08:00
|
|
|
|
<!-- 弹窗HTML -->
|
2018-08-10 09:48:43 +08:00
|
|
|
|
<div class="PopWin">
|
|
|
|
|
<div class="Panel">
|
2018-08-10 10:41:37 +08:00
|
|
|
|
<div id="PopWinTitle" class="PanelTitle">信息框</div>
|
2018-08-10 09:48:43 +08:00
|
|
|
|
<div class="PanelBody">
|
2018-08-10 10:16:12 +08:00
|
|
|
|
<div id="PopWinContext">
|
|
|
|
|
<!-- 动态 HTML -->
|
|
|
|
|
<p>正在加载信息框,请稍等...</p>
|
|
|
|
|
</div>
|
2018-08-10 09:48:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-08-10 10:17:22 +08:00
|
|
|
|
|
|
|
|
|
<!-- 黑屏 HTML -->
|
|
|
|
|
<div id="balckWarp" onclick="TOOLS.popWindClose(null);"></div>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2020-01-29 12:06:48 +08:00
|
|
|
|
<!-- 手机端导航球 -->
|
2020-01-27 13:34:04 +08:00
|
|
|
|
<div id="SidebarButton" v-on:click="operate()">
|
|
|
|
|
<div class="SidebarButtonWapper">
|
2020-01-27 13:55:20 +08:00
|
|
|
|
<span class="glyphicon " :class="!isExpand?'glyphicon-th-list':'glyphicon-list'" aria-hidden="true"></span>
|
2020-01-27 13:34:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2020-03-02 14:24:04 +08:00
|
|
|
|
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--JavaScript 文件引用,顺序不能乱,大部分 js 都是依赖于前 js 的-->
|
2018-02-17 18:46:31 +08:00
|
|
|
|
<script type="text/javascript" src="common/jquery-3.2.1.min.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--Vue -->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/vue/vue.min.js"></script>
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<!--公用的js方法,公用的函数,类,模式-->
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!-- 全局变量 MI(中介者) MS(保留) MCSERVER(全局寄生器)-->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/common.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--URL 处理函数 MCSERVER.URL URL 定位器-->
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<script type="text/javascript" src="common/URL.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--请求类相关方法 全局变量 RES(请求) PAGE(单页应用临时全局存储变量)-->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/response.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--Websocket 封装类 全局变量 WS -->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/websocket.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--工具类 全局变量 TOOLS(工具箱)-->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/tools.js"></script>
|
2020-01-27 13:34:04 +08:00
|
|
|
|
<!--首页菜单获取 虚拟的后端菜单数据-->
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/meum.js"></script>
|
2020-01-27 13:34:04 +08:00
|
|
|
|
<!--echarts 库 统计图-->
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<script type="text/javascript" src="common/echarts.js"></script>
|
2020-01-27 13:34:04 +08:00
|
|
|
|
<!--Vue.data 数据模型处理 全局变量 VIEW_MODEL-->
|
2018-01-24 17:44:39 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/viewmodel.js"></script>
|
2018-02-04 15:34:13 +08:00
|
|
|
|
<!--图像统计表格封装 附属于 TOOLS 变量-->
|
2017-11-13 12:26:31 +08:00
|
|
|
|
<script type="text/javascript" src="common/js/chart.js"></script>
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-01-29 12:06:48 +08:00
|
|
|
|
// 网络加载判断
|
2018-02-13 15:23:29 +08:00
|
|
|
|
if (!window.$) alert('[文件加载失败] 网络不通畅,请检查您的网络状态!');
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2020-01-29 12:06:48 +08:00
|
|
|
|
// // 动态背景色,稍后会继续改变
|
|
|
|
|
// $('body').css('background-color', 'rgb(243, 243, 243);');
|
|
|
|
|
|
2018-06-02 16:43:36 +08:00
|
|
|
|
MCSERVER.website = {};
|
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
$(function () {
|
2020-03-02 14:24:04 +08:00
|
|
|
|
|
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//事件
|
|
|
|
|
window.onresize = function () {
|
|
|
|
|
MI.on('resize', null);
|
2017-11-13 12:26:31 +08:00
|
|
|
|
}
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//防止页面后退
|
|
|
|
|
history.pushState(null, null, document.URL);
|
|
|
|
|
window.addEventListener('popstate', function () {
|
|
|
|
|
history.pushState(null, null, document.URL);
|
|
|
|
|
});
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//一般制约能力的防止被 iframe 嵌入,另外,HTTP返回了 X-Frame-Options: DENY
|
2018-02-04 15:34:13 +08:00
|
|
|
|
// window.top.location !== window.location && (window.top.location = window.location); //已弃用
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
// echart 路径配置
|
|
|
|
|
window.require.config({
|
|
|
|
|
paths: {
|
|
|
|
|
echarts: './common/echarts-dist'
|
|
|
|
|
}
|
|
|
|
|
});
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//抗CSRF攻击
|
|
|
|
|
//身份验证,令牌获取
|
|
|
|
|
RES.getToken(function (token) {
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
RES.TOKEN = token;
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//初始化 Websocket
|
|
|
|
|
WS.init(function () {
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//获取菜单
|
|
|
|
|
WS.sendMsg('menu', '');
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//异步自动获取单页
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2020-03-01 22:39:19 +08:00
|
|
|
|
//是否登陆
|
|
|
|
|
if (!MCSERVER.username) {
|
|
|
|
|
window.location.href = MCSERVER.URL("login");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2018-01-18 11:00:54 +08:00
|
|
|
|
|
2020-03-01 22:39:19 +08:00
|
|
|
|
// 判断是否需要进行页面转移
|
|
|
|
|
if (!TOOLS.page(true)) {
|
2018-01-18 11:00:54 +08:00
|
|
|
|
//判断是否是#权限用户,请放心,后端也会给予判断并不只是前端
|
|
|
|
|
if (MCSERVER.username.substr(0, 1) == '#') {
|
2018-04-26 10:48:20 +08:00
|
|
|
|
RES.redirectPage('./template/center.html', 'center/show', '--- 更新页面 ---');
|
2018-01-18 11:00:54 +08:00
|
|
|
|
} else {
|
|
|
|
|
RES.redirectPage('./template/gen_home.html', 'genuser/home', '--- 更新页面 ---');
|
|
|
|
|
}
|
2020-03-01 22:39:19 +08:00
|
|
|
|
}
|
2018-01-18 11:00:54 +08:00
|
|
|
|
});
|
2017-11-13 12:26:31 +08:00
|
|
|
|
});
|
2018-01-18 11:00:54 +08:00
|
|
|
|
|
|
|
|
|
//建立 退出按钮 Vue
|
|
|
|
|
var vueLoginOut = new Vue({
|
2017-11-13 12:26:31 +08:00
|
|
|
|
el: '#loginOut',
|
|
|
|
|
methods: {
|
|
|
|
|
loginOut: function () {
|
|
|
|
|
RES.ajax({
|
|
|
|
|
type: 'POST',
|
|
|
|
|
url: './user/loginout',
|
|
|
|
|
success: function () {
|
|
|
|
|
WS.close();
|
|
|
|
|
TOOLS.pushMsgWindow('您已退出,现在即将跳转网页');
|
|
|
|
|
setTimeout(function () {
|
2018-02-13 15:23:29 +08:00
|
|
|
|
window.location.href = MCSERVER.URL('login');
|
2017-11-13 12:26:31 +08:00
|
|
|
|
}, 2000);
|
|
|
|
|
},
|
|
|
|
|
error: function () {
|
|
|
|
|
TOOLS.pushMsgWindow('退出失败,您网络正常且是否登陆?');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2018-02-04 15:34:13 +08:00
|
|
|
|
//工具信息栏
|
2018-01-18 11:00:54 +08:00
|
|
|
|
VIEW_MODEL.newVueOnce('ToolsInfo', {
|
|
|
|
|
el: '#ToolsInfo',
|
|
|
|
|
data: {
|
|
|
|
|
show: false,
|
|
|
|
|
msg: ''
|
|
|
|
|
}
|
|
|
|
|
});
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2020-01-27 13:34:04 +08:00
|
|
|
|
// 手机端导航球
|
|
|
|
|
var SidebarButton = new Vue({
|
|
|
|
|
el: "#SidebarButton",
|
|
|
|
|
data: {
|
|
|
|
|
isExpand: false
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
operate: function () {
|
|
|
|
|
MCSERVER.colmSet(!MCSERVER.getColmStatus());
|
|
|
|
|
// TOOLS.blackJumbotron(!this.isExpand)
|
|
|
|
|
this.isExpand = !MCSERVER.getColmStatus();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
VIEW_MODEL.COMMON = {};
|
2017-11-13 12:26:31 +08:00
|
|
|
|
|
2018-01-18 11:00:54 +08:00
|
|
|
|
});
|
2017-11-13 12:26:31 +08:00
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html>
|