only("account","password"); //登录 $result = (new EmployeeService())->loginRule($data); list($bool, $return) = $result; if(! $bool) return $this->json_return(201,'',$return); //生成token $jwtToken = TokenService::getToken($return['id']); return $this->json_return(200,'', ['id' => $return['id'],'token' => $jwtToken, 'emp_name'=>$return['name'], 'all_top' => $return['all_top']]); } }