代码: 全选
/**
* 异步请求入口
*
* @access public
* @return void
*/
public function action()
{
//设置模拟静态连接的ajax请求会从这里返回,不会调用remoteCallback
// if (!$this->request->isAjax()) {
// $this->response->goBack();
// }
$this->on($this->request->is('do=remoteCallback'))->remoteCallback();
$this->on($this->request->is('do=feed'))->feed();
$this->on($this->request->is('do=checkVersion'))->checkVersion();
$this->on($this->request->is('do=editorResize'))->editorResize();
}
}
每次都会从
代码: 全选
$this->response->goBack();
代码: 全选
$this->on($this->request->is('do=remoteCallback'))->remoteCallback();
代码: 全选
echo 'OK';