private function login() { $map = array(); $map['user_login'] = I('post.username'); $map['user_status'] = array('gt', 0); $map = array(); $map['user_login'] = I('post.username'); $map['user_status'] = array('gt', 0); $map['user_pass'] = encrypt(I('post.password')); $UserEvent = new \Common\Event\UserEvent(); $loginRes = $UserEvent->auth($map); }
/** * */ public function login() { // $ipLocation = new IpLocation(); // $ip_info = $ipLocation->getIpInfo(); if (get_opinion('vertify_code', true, true)) { $verify = new \Think\Verify(); if (!$verify->check(I('post.vertify'))) { $this->error("验证码错误", U('Admin/Login/index')); } } $map = array(); $map['user_login'] = I('post.username'); $map['user_status'] = array('gt', 0); $map['user_pass'] = encrypt(I('post.password')); $UserEvent = new \Common\Event\UserEvent(); $loginRes = $UserEvent->auth($map); $this->json2Response($loginRes); }