mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:59:25 +08:00
端口修改后,跳转优化
This commit is contained in:
@@ -27,7 +27,7 @@ from flask import request
|
||||
|
||||
class config_api:
|
||||
|
||||
__version = '0.14.3'
|
||||
__version = '0.14.3.1'
|
||||
__api_addr = 'data/api.json'
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -36,10 +36,14 @@ $('input[name="host_ip"]').change(function(){
|
||||
|
||||
$('input[name="port"]').change(function(){
|
||||
var port = $(this).val();
|
||||
var old_port = $(this).data('port');
|
||||
$('.btn_port').removeAttr('disabled');
|
||||
$('.btn_port').unbind().click(function(){
|
||||
$.post('/config/set_port','port='+port, function(rdata){
|
||||
showMsg(rdata.msg,function(){window.location.reload();},{icon:rdata.status?1:2},2000);
|
||||
showMsg(rdata.msg,function(){
|
||||
window.location.href = window.location.href.replace(old_port,port);
|
||||
// window.location.reload();
|
||||
},{icon:rdata.status?1:2},2000);
|
||||
},'json');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<p class="mtb15">
|
||||
<span class="set-tit text-right">面板端口</span>
|
||||
<input id="banport" name="port" class="inputtxt bt-input-text" type="numner" value="{{data['port']}}" maxlength="5">
|
||||
<input data-port="{{data['port']}}" id="banport" name="port" class="inputtxt bt-input-text" type="numner" value="{{data['port']}}" maxlength="5">
|
||||
<button type="button" class="btn btn-success btn-sm ml5 btn_port" disabled>保存</button>
|
||||
<span class="set-info c7">建议端口范围7200 - 65535</span>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user