This commit is contained in:
zhujinyong
2021-07-19 11:59:06 +08:00
86 changed files with 656 additions and 515 deletions
+8 -1
View File
@@ -893,7 +893,14 @@ class baseControl
$data = (array) $data;
if(helper::isAjaxRequest() or $this->viewType == 'json')
{
print(json_encode($data));
/* Process for zh-cn in json. */
foreach($data as $key => $value)
{
if(!is_string($value)) continue;
$data[$key] = urlencode($value);
}
print(urldecode(json_encode($data)));
$response = helper::removeUTF8Bom(ob_get_clean());
if(defined('RUN_MODE') and RUN_MODE == 'api') return print($response);