diff --git a/plugins/xui/index.py b/plugins/xui/index.py index 7a4207dac..a7b050e5d 100755 --- a/plugins/xui/index.py +++ b/plugins/xui/index.py @@ -156,17 +156,17 @@ def initdUinstall(): def getXuiInfo(): + data = {} user = pSqliteDb('users') - info = user.field('username,password').where("id=?", (1,)).find() setting = pSqliteDb('settings') + setting_data = setting.field('webPort')..where("key=?", ('webPort',)).find() - setting_data = setting.where("key=?", ('webPort',)).find() - - print(info) - print(setting_data) - return mw.returnJson(True, 'ok', '') + data['username'] = info['username'] + data['password'] = info['password'] + data['port'] = info['webPort'] + return mw.returnJson(True, 'ok', data) def installPreInspection(): sys = mw.execShell("cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'") diff --git a/plugins/xui/js/xui.js b/plugins/xui/js/xui.js index 748e2db60..7b1fbe161 100644 --- a/plugins/xui/js/xui.js +++ b/plugins/xui/js/xui.js @@ -27,35 +27,53 @@ function mtPost(method, version, args,callback){ } function mtCommonFunc(){ - var con = '
\ - \ -
'; - - $(".soft-man-con").html(con); - - $('#mtproxy_url').click(function(){ - mtPost('url', '', {}, function(rdata){ - var data = $.parseJSON(rdata.data); - - layer.open({ - title: "mtproxy代理信息", - area: ['600px', '180px'], - type:1, - closeBtn: 1, - shadeClose: false, - btn:["复制","取消"], - content: ''+data.data+'\ -
\ + 用户名\ + , 秒\ +
'; + + con += '\ + 密码\ + ,MB\ +
'; + con += '\ + 端口\ + ,MB\ +
'; + + var con = '\ + \ +
'; + + $(".soft-man-con").html(con); }); + + // $('#mtproxy_url').click(function(){ + // mtPost('url', '', {}, function(rdata){ + // var data = $.parseJSON(rdata.data); + + // layer.open({ + // title: "mtproxy代理信息", + // area: ['600px', '180px'], + // type:1, + // closeBtn: 1, + // shadeClose: false, + // btn:["复制","取消"], + // content: ''+data.data+'\ + //