diff --git a/plugins/php/index.py b/plugins/php/index.py index abc87266a..57599269c 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -569,11 +569,12 @@ def uninstallLib(version): execstr = "cd " + getPluginDir() + '/versions/' + version + " && /bin/bash " + \ name + '.sh' + ' uninstall ' + version - rettime = time.strftime('%Y-%m-%d %H:%M:%S') - insert_info = (None, '安装[' + name + '-' + version + ']', - 'execshell', '0', rettime, execstr) - public.M('tasks').add('id,name,type,status,addtime,execstr', insert_info) - return public.returnJson(True, '已将卸载载任务添加到队列!') + data = public.execShell(execstr) + if data[1] == '': + return public.returnJson(True, '已经卸载成功!') + else: + return public.returnJson(False, '卸载出现错误信息!' + data[1]) + if __name__ == "__main__": diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index 869160058..f807ed980 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -508,9 +508,12 @@ function installPHPLib(version, name, title, pathinfo) { phpPost('install_lib', version, data, function(data){ var rdata = $.parseJSON(data.data); - layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); - getTaskCount(); - phpLibConfig(version); + // layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); + showMsg(rdata.msg, function(){ + getTaskCount(); + phpLibConfig(version); + },{ icon: rdata.status ? 1 : 2 }); + }); }); } @@ -522,9 +525,12 @@ function uninstallPHPLib(version, name, title, pathinfo) { var data = 'name=' + name + '&version=' + version; phpPost('uninstall_lib', version, data, function(data){ var rdata = $.parseJSON(data.data); - layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); - getTaskCount(); - phpLibConfig(version); + // layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); + showMsg(rdata.msg, function(){ + getTaskCount(); + phpLibConfig(version); + },{ icon: rdata.status ? 1 : 2 }); + }); }); } \ No newline at end of file