$this->display ( "Public:login" );
import ( 'Wechat', APP_PATH . 'Common/Wechat', '.class.php' );//引入某个类,这样是使用$weObj = new Wechat ( $options );
$this->success ( "登录成功", U ( "Admin/Index/index" ) );
$this->error ( "登录失败", U ( "Admin/Index/index" ) );
R函数调用了Api文件夹中的login函数,并输入两个参数;
$result = R ( "Api/Api/login", array (
$_POST ["username"],
$_POST ["password"]
) );
$data=$this->_post();