You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
200 lines
10 KiB
200 lines
10 KiB
<!DOCTYPE html>
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!--#include file="/widget/head.html"-->
|
|
<style>
|
|
.layui-form-label {
|
|
width: 120px !important;
|
|
}
|
|
|
|
#mdiv .layui-form-item {
|
|
margin-bottom: 5px !important;
|
|
}
|
|
|
|
.layui-tab-card > .layui-tab-title {
|
|
background-color: #009688 !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="wrapper">
|
|
<iframe src="../dist/index.html#/addRealm" width="400px" height="600px" scrolling="yes" noresize="noresize" frameborder="0" id="serverIframe"></iframe>
|
|
<!-- Navigation -->
|
|
<!-- <form class="layui-form" lay-filter="mform" action="">
|
|
<div style="height:650px;border: solid 1px #a3a3a3;" id="mdiv">
|
|
<div style="height:600px;">
|
|
<div style="float:left;width:49%;">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">地区名称</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="areaName" required lay-verify="required" placeholder="请输入地区名称" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">时区</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="timezone" required lay-verify="required" placeholder="请输入时区" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">worldId</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="worldId" required lay-verify="required" placeholder="请输入worldId" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">ip</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="ip" required lay-verify="ip" placeholder="请输入ip" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">realmId</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="realmId" required lay-verify="required" placeholder="请输入realmId" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">服务器名称</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="realmName" required lay-verify="required" placeholder="请输入服务器名称" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">状态</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="radio" value="0" data-id="status" name="status" lay-filter='status' title="停服维护">
|
|
<input type="radio" value="1" data-id="status" name="status" lay-filter='status' title="正常">
|
|
<input type="radio" value="2" data-id="status" name="status" lay-filter='status' title="爆满">
|
|
<input type="radio" value="99" data-id="status" name="status" lay-filter='status' title="新服">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">bdcName</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="bdcName" required lay-verify="required" placeholder="请输入bdcName" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item" data-trigger="0">
|
|
<label class="layui-form-label" style="width:120px;">openTime</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="openTime" id="openTime" placeholder="请输入openTime" required lay-verify="required" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item" data-trigger="0">
|
|
<label class="layui-form-label" style="width:120px;">
|
|
visibleTime
|
|
</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="visibleTime" id="visibleTime" placeholder="请输入visibleTime" value="" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">
|
|
bigRealmId
|
|
</label>
|
|
<div class="layui-input-inline" style="width:200px">
|
|
<input type="text" name="bigRealmId" id="bigRealmId" placeholder="请输入bigRealmId" value="" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-input-inline" style="user-select:initial;text-align: center;margin: 0 auto;display: block;">
|
|
<div class="layui-input-inline">
|
|
<button class="layui-btn layui-bg-red" lay-submit lay-filter="formDemo">保存</button>
|
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form> -->
|
|
</div>
|
|
<script>
|
|
const isMobileTerminal = () => {
|
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
navigator.userAgent
|
|
)
|
|
}
|
|
function resizeFrame(){
|
|
var content_iframe = document.getElementById("serverIframe");//获取iframeID
|
|
console.log(content_iframe)
|
|
content_iframe.width = isMobileTerminal() ? 400 : 1400;
|
|
}
|
|
resizeFrame()
|
|
// function getDateFromString(str){
|
|
// var reg = /^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/;
|
|
// var s = str.match(reg);
|
|
// var result="";
|
|
// if(s){
|
|
// result = new Date(s[1],s[2] - 1,s[3],s[4],s[5],s[6]);
|
|
// }
|
|
// return result ;
|
|
// }
|
|
// function sub_add_realm() {
|
|
// layui.form.on('submit(formDemo)', function (data) {
|
|
// data.field.token = cookie.get("token");
|
|
// var postData = {
|
|
// type: "post",
|
|
// url: Page.SvrIp + "/api/add_realm?token=" + cookie.get("token"),
|
|
// data: JSON.stringify(data.field),
|
|
// dataType: "json",
|
|
// success: function (d) {
|
|
// if (d.ret == 0) {
|
|
// //alert(d.msg);
|
|
// layui.message(data.Id == 0?"添加成功!":"修改成功!");
|
|
// parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
// parent.location.reload();
|
|
// }
|
|
// layer.msg(d.msg);
|
|
// },
|
|
// error: function () {
|
|
// layer.msg("保存失败");
|
|
// }
|
|
// };
|
|
// if(getDateFromString(data.field.openTime) < new Date()) {
|
|
// layer.confirm('开服时间早于当前时间,确认继续?', function (index) {
|
|
// $.ajax(postData);
|
|
// layer.close(index);
|
|
// });
|
|
// } else {
|
|
// $.ajax(postData);
|
|
// }
|
|
// return false;
|
|
// })
|
|
// }
|
|
// </script>
|
|
// <script>
|
|
// $(function () {
|
|
// sub_add_realm();
|
|
|
|
// layui.laydate.render({
|
|
// elem: '#openTime',
|
|
// type: "datetime"
|
|
// });
|
|
// layui.laydate.render({
|
|
// elem: '#visibleTime',
|
|
// type: "datetime"
|
|
// });
|
|
// layui.form.verify({
|
|
// ip: function(value, item){
|
|
// function isValidIP(ip) {
|
|
// var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
|
|
// return reg.test(ip);
|
|
// }
|
|
// if(isValidIP(value) == false){
|
|
// return '请输入正确的IP地址';
|
|
// }
|
|
// }
|
|
// });
|
|
// })
|
|
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<script type="text/javascript" src="../js/template-web.js"></script>
|