作者 郭文星

312

@@ -58,8 +58,12 @@ class Index extends Api @@ -58,8 +58,12 @@ class Index extends Api
58 ]; 58 ];
59 $res =HttpHelper::post($loginurl,$logindata); 59 $res =HttpHelper::post($loginurl,$logindata);
60 $jsonlogin=json_decode($res,true); 60 $jsonlogin=json_decode($res,true);
61 - print_r($jsonlogin);return ;  
62 - return $this->success($jsondata['msg'],$jsondata['data']); 61 + if($jsonlogin['code']==200){
  62 + return $this->success($jsonlogin['msg'],$jsonlogin['data']);
  63 + }else{
  64 + return $this->error("请求失败");
  65 + }
  66 +
63 }else{ 67 }else{
64 return $this->error("请求失败"); 68 return $this->error("请求失败");
65 } 69 }