Example #1
0
 /**
  * @brief 处理接口采集后的返回值
  * @param $result array('result' => 'success' or 'fail','data' => array(采集数据),'msg' => '错误消息')
  * @return string or false
  */
 private static function response($result)
 {
     if (isset($result['result']) && $result['result'] == 'success') {
         return $result['data'];
     } else {
         $msg = isset($result['msg']) ? $result['msg'] : '没有采集到数据信息';
         self::$error = $msg;
         return false;
     }
 }