/**
  * 请求替换
  * 在请求之前进行客户端确认
  */
 public function _before_run()
 {
     $this->_method = I('param._method', $this->_method);
     if (!checkWechat()) {
         // 显示只能在微信内置浏览器中打开
         redirect('/Home/ErrorMessage.html?errcode=2');
     }
 }
 /**
  * 请求替换
  * 在请求之前进行客户端确认
  */
 public function _before_run()
 {
     $this->_method = I('param._method', $this->_method);
     if (!checkWechat()) {
         $this->response(array('errcode' => 2), 'json');
     }
     $this->uid = session('uid');
     if (!$this->uid) {
         $this->response(array('errcode' => 1), 'json');
     }
 }