修改 可能的监听服务器问题

This commit is contained in:
suwings 2018-11-15 08:43:27 +08:00
parent 14593e7da2
commit 74c6fd83a8
3 changed files with 9 additions and 9 deletions

View File

@ -165,8 +165,7 @@
<script>
MI.rListener('onload', function () {
var serverName = VIEW_MODEL['ConsolePanel'].serverData.name;
MCSERVER.listenServername = serverName;
var serverName = MCSERVER.listenServername || "";
VIEW_MODEL.newVue('ConsolePanel', {
el: '#ConsolePanel',
@ -213,7 +212,7 @@
command: "",
allowedStart: true,
runStatusClass: '',
username: MCSERVER.username
username: MCSERVER.listenServername
},
watch: {
run: function (cur, old) {}

View File

@ -160,14 +160,11 @@
top: "15%"
},
title: "Minecraft Docker 配置",
template: "template/dialog/docker_config.html",
callback: function (result) {
// if (!result) return;
// console.log(result)
}
template: "template/dialog/docker_config.html"
});
},
toConsole: function (serverName) {
MCSERVER.listenServername = this.oldServerName;
RES.redirectPage('./template/component/console.html', 'server/console', this.oldServerName);
},
toRebulider: function () {

View File

@ -54,7 +54,7 @@
<button class="btn btn-primary" v-on:click="toTerminal(item.serverName);">
终端
</button>
<button class="btn btn-success" v-on:click="onRedirect('./template/component/console.html', 'server/console', item.serverName );">
<button class="btn btn-success" v-on:click="toConsole(item.serverName);">
控制
</button>
<button class="btn btn-info" v-on:click="onRedirect('./template/component/server.html','server/get',item.serverName);">
@ -78,6 +78,10 @@
VIEW_MODEL.newVue('ServerList', {
el: '#ServerList',
methods: {
toConsole: function (serverName) {
MCSERVER.listenServername = serverName;
RES.redirectPage('./template/component/console.html', 'server/console', serverName);
},
onRedirect: function (link, api, serverName) {
RES.redirectPage(link, api, serverName);
},