* finish task #40304.

This commit is contained in:
wangyidong
2021-07-16 13:28:46 +08:00
parent 92ea15541f
commit 143d8336b1
2 changed files with 10 additions and 2 deletions
+8 -1
View File
@@ -892,7 +892,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);