diff --git a/plugins/deployment/ico-deployment.png b/plugins/deployment/ico.png similarity index 100% rename from plugins/deployment/ico-deployment.png rename to plugins/deployment/ico.png diff --git a/plugins/mysql/ico.png b/plugins/mysql/ico.png new file mode 100755 index 000000000..84cc93291 Binary files /dev/null and b/plugins/mysql/ico.png differ diff --git a/plugins/nginx/ico-nginx.png b/plugins/nginx/ico.png similarity index 100% rename from plugins/nginx/ico-nginx.png rename to plugins/nginx/ico.png diff --git a/plugins/php/ico.png b/plugins/php/ico.png new file mode 100755 index 000000000..63a624fdd Binary files /dev/null and b/plugins/php/ico.png differ diff --git a/plugins/php/icon.png b/plugins/php/icon.png deleted file mode 100644 index 66d0ff025..000000000 Binary files a/plugins/php/icon.png and /dev/null differ diff --git a/plugins/phpguard/ico.png b/plugins/phpguard/ico.png new file mode 100755 index 000000000..b4fc27b13 Binary files /dev/null and b/plugins/phpguard/ico.png differ diff --git a/plugins/score/ico.png b/plugins/score/ico.png new file mode 100755 index 000000000..42a9ac308 Binary files /dev/null and b/plugins/score/ico.png differ diff --git a/plugins/vpn/ico-vpn.png b/plugins/vpn/ico-vpn.png deleted file mode 100644 index 66d0ff025..000000000 Binary files a/plugins/vpn/ico-vpn.png and /dev/null differ diff --git a/plugins/mysql/icon.png b/plugins/vpn/ico.png similarity index 100% rename from plugins/mysql/icon.png rename to plugins/vpn/ico.png diff --git a/plugins/vpn/info.json b/plugins/vpn/info.json index 65c94ebe0..40e16ef5d 100755 --- a/plugins/vpn/info.json +++ b/plugins/vpn/info.json @@ -1,7 +1,7 @@ { "title":"VPN", "tip":"lib", - "name":"VPN", + "name":"vpn", "type":"其他插件", "ps":"科学上网", "versions":[ diff --git a/static/js/soft.js b/static/js/soft.js index 5c09e6ee8..4c5041f4a 100755 --- a/static/js/soft.js +++ b/static/js/soft.js @@ -1755,6 +1755,7 @@ function GetSList(isdisplay) { if (istype == 'undefined' || istype == 'null' || !istype) { istype = '0'; } + type = '&type=' + istype; var page = ''; if (isdisplay) { @@ -1762,7 +1763,9 @@ function GetSList(isdisplay) { setCookie('p' + getCookie('softType'), isdisplay); } - $.post('/plugins/list?' + search + type + page, '', function(rdata) { + var condition = (search + type + page).slice(1); + $.post('/plugins/list?' + condition, '', function(rdata) { + console.log(rdata); layer.close(loadT); var tBody = ''; var sBody = ''; @@ -1836,7 +1839,9 @@ function GetSList(isdisplay) { } sBody += '' + - '' + rdata.data[i].title + ' ' + version + '' + + '' + rdata.data[i].title + ' ' + version + '' + '' + rdata.data[i].ps + '' + '' + softPath + '' + '' + state + '' + @@ -1887,7 +1892,7 @@ function GetSList(isdisplay) { handle = '' + lan.soft.sleep_install + '' } pBody += '' + - '' + rdata.data[i].title + '-' + rdata.data[i].versions[n].version + '' + '' + rdata.data[i].title + '-' + rdata.data[i].versions[n].version + '' //+''+rdata.data[i].versions[n].no+'' //+''+rdata.data[i].type+'' + diff --git a/views/plugins.py b/views/plugins.py index 59290b16c..b5a0b0293 100644 --- a/views/plugins.py +++ b/views/plugins.py @@ -27,13 +27,20 @@ def index(): @plugins.route("/file", methods=['GET']) def file(): - file = request.args.get('f', '') - print file - return jsonify({}) - # if file: - # print file - # else: - # print "error" + name = request.args.get('name', '') + if name.strip() == '': + return '' + + f = request.args.get('f', '') + if f.strip() == '': + return '' + + file = "plugins/" + name + "/" + f + if not os.path.exists(file): + return "" + + c = public.readFile(file) + return c @plugins.route("/list", methods=['GET', 'POST'])