php扩展库读取优化
This commit is contained in:
parent
d4346a51bc
commit
1ad1e3326d
|
|
@ -890,7 +890,7 @@ def get_php_info(args):
|
|||
return getPhpinfo(args['version'])
|
||||
|
||||
|
||||
def getLibConf(version):
|
||||
def libConfCommon(version):
|
||||
fname = getConf(version)
|
||||
if not os.path.exists(fname):
|
||||
return mw.returnJson(False, '指定PHP版本不存在!')
|
||||
|
|
@ -919,6 +919,17 @@ def getLibConf(version):
|
|||
else:
|
||||
lib['status'] = True
|
||||
libs.append(lib)
|
||||
return libs
|
||||
|
||||
|
||||
def get_lib_conf(data):
|
||||
libs = libConfCommon(data['version'])
|
||||
# print(libs)
|
||||
return mw.returnData(True, 'OK!', libs)
|
||||
|
||||
|
||||
def getLibConf(version):
|
||||
libs = libConfCommon(version)
|
||||
return mw.returnJson(True, 'OK!', libs)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function phpPostCallbak(method, version, args,callback){
|
|||
req_data['func'] = method;
|
||||
args['version'] = version;
|
||||
|
||||
if (typeof(args) == 'string'){
|
||||
if (typeof(args) == 'string' && args == ''){
|
||||
req_data['args'] = JSON.stringify(toArrayObject(args));
|
||||
} else {
|
||||
req_data['args'] = JSON.stringify(args);
|
||||
|
|
@ -582,9 +582,13 @@ function getPHPInfo(version) {
|
|||
|
||||
|
||||
function phpLibConfig(version){
|
||||
|
||||
// phpPost('get_lib_conf', version, {}, function(rdata){
|
||||
// var rdata = $.parseJSON(rdata.data);
|
||||
// });
|
||||
|
||||
phpPost('get_lib_conf', version, '', function(data){
|
||||
var rdata = $.parseJSON(data.data);
|
||||
phpPostCallbak('get_lib_conf', version, {}, function(rdata){
|
||||
var rdata = rdata.data;
|
||||
|
||||
if (!rdata.status){
|
||||
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue