mdserver-web/plugins/doh/js/doh.js

37 lines
910 B
JavaScript
Executable File

function dohPost(method,args,callback, title){
var _args = null;
if (typeof(args) == 'string'){
_args = JSON.stringify(toArrayObject(args));
} else {
_args = JSON.stringify(args);
}
var _title = '正在获取...';
if (typeof(title) != 'undefined'){
_title = title;
}
var loadT = layer.msg(_title, { icon: 16, time: 0, shade: 0.3 });
$.post('/plugins/run', {name:'doh', func:method, args:_args}, function(data) {
layer.close(loadT);
if (!data.status){
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
return;
}
if(typeof(callback) == 'function'){
callback(data);
}
},'json');
}
function dohRead(){
var readme = '<ul class="help-info-text c7">';
readme += '<li>DNS服务</li>';
readme += '</ul>';
$('.soft-man-con').html(readme);
}