/**
  * ajax请求通用返回接口
  * @author: yugang@ymt360.com
  * @param: result 操作结果
  * @since 2015-01-27
  */
 public function _return($result, $success_msg = '操作成功', $failure_msg = '操作失败')
 {
     if ($result) {
         $this->_return_json(array('status' => C('status.req.success'), 'msg' => $success_msg, 'xhprof' => C("xhprof.switch") ? end_xhprof() : ""));
     } else {
         $this->_return_json(array('status' => C('status.req.failed'), 'msg' => $failure_msg, 'xhprof' => C("xhprof.switch") ? end_xhprof() : ""));
     }
 }
 /**
  * ajax请求通用返回接口
  * @author: yugang@ymt360.com
  * @param: result 操作结果
  * @since 2015-01-27
  */
 public function _return($result, $msg = '')
 {
     if ($result) {
         $this->_return_json(array('status' => C('status.req.success'), 'msg' => !empty($msg) ? $msg : '操作成功', 'xhprof' => C("xhprof.switch") ? end_xhprof() : ""));
     } else {
         $this->_return_json(array('status' => C('status.req.failed'), 'msg' => !empty($msg) ? $msg : '操作失败', 'xhprof' => C("xhprof.switch") ? end_xhprof() : ""));
     }
 }
 public function check_login($is_customer = TRUE)
 {
     $cur = $this->userauth->current($is_customer);
     if (!$cur) {
         $this->_return_json(array('status' => -100, 'msg' => '超时或还没有登录', 'xhprof' => C("xhprof.switch") ? end_xhprof() : "", 's_xhprof' => $this->s_xhprof));
     }
     return $cur;
 }