xfrontend/web/srczip/logic/sqlquery.js
2021-07-09 18:15:09 +08:00

28 lines
796 B
JavaScript

(function(){
X.pageLogic['sqlquery'] = {
init : function(){
$(document).off('click','.sqlquery-but').on('click','.sqlquery-but',function(){
var txt = $('.sql-textarea').val();
// console.log(EncodeURIFilter(txt));
X.api("ck/sql","post",{"sql": txt},function(d){
console.log(JSON.stringify(d));
$('.table-sql-box-con').html(JSON.stringify(d));
})
})
// function EncodeURIFilter(str) {
// if(str != null && str != "") {
// str = str.replace(/\+/g, "%2B");
// str = str.replace(/\&/g, "%26");
// }
// return str;
// }
}
};
})();