public function login()
 {
     //实现登陆
     if (IS_POST) {
         $model = new \Model\UserModel();
         if ($model->login()) {
             $url = empty($_SESSION['return_url']) ? 'Index/index' : $_SESSION['return_url'];
             //用户登陆成功调用转移cookie中购物车的数据入数据库
             $cart_model = new \Model\CartModel();
             $cart_model->cookie2db();
             $this->success('登陆成功', U($url), 1);
             exit;
         }
         $this->error($model->getError());
     }
     $this->display();
 }