浏览代码

no message

DESKTOP-9JTA2JJ\HP 5 年之前
父节点
当前提交
51cea7dd9f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      api/application/helpers/function_helper.php

+ 2 - 1
api/application/helpers/function_helper.php

@@ -423,7 +423,8 @@ function weather_translate_ru($code){
 }
 
 //输出json
-function json_result($code, $msg, $data = array()) {
+function json_result($code, $msg, $data = array(),$resType == 0) {
+    $data = empty($data) && $resType == 0? new stdClass() : $data;
     $res = array('code' => $code,'msg' => $msg,'data' => $data);
     $CI =& get_instance();
     $clientId = $CI->input->post('clientId',true);