This commit is contained in:
yumoqing 2024-11-23 12:42:24 +08:00
parent 599fbc28b8
commit e8e09a99c1
2 changed files with 15 additions and 0 deletions

View File

@ -445,6 +445,7 @@ bricks.App = class extends bricks.Layout {
/*
opts = {
appname:
debug:false, true, 'server'
login_url:
"charsize:
"language":

View File

@ -13,10 +13,24 @@ bricks.is_empty = function(obj){
if (obj === null) return true;
return JSON.stringify(obj) === '{}';
}
bricks.serverdebug = async function(message){
console.log(arguments, 'er==============er');
var jc = new bricks.HttpJson();
await jc.post(url='/debug', {params:{
message:message
}});
return;
}
bricks.debug = function(...args){
if (! bricks.bug){
return;
}
if (bricks.bug == 'server'){
var message = args.join(" ");
f = bricks.serverdebug.bind(null, message);
schedule_once(f, 0.1);
return;
}
var callInfo;
try {
throw new Error();