Update application/index/controller/Ajax.php

修正application/config.php中'app_trace'=>Env::get('app.trace', true)时,浏览器访问e用户中心”/index/user"F12调试显示错误:Uncaught SyntaxError: Unexpected token <
pull/80/MERGE
raorf 2018-10-26 14:55:08 +08:00
parent d60dcca9cb
commit 336597859a
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Ajax extends Frontend
$controllername = input("controllername");
$this->loadlang($controllername);
//强制输出JSON Object
$result = 'define(' . json_encode(Lang::get(), JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . ');';
$result = jsonp(Lang::get(), 200, [], ['json_encode_param' => JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE]);
return $result;
}