Commit 5cb6e188f47212b8a3ea6cfc30a3e16516240c48

Authored by pengye
1 parent 2184b592

no message

@@ -38,12 +38,12 @@ class Comment extends Common @@ -38,12 +38,12 @@ class Comment extends Common
38 $data['enclosure'] = json_encode($data['enclosure']); 38 $data['enclosure'] = json_encode($data['enclosure']);
39 #unset($data['enclosure']); 39 #unset($data['enclosure']);
40 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data); 40 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data);
41 - #$succ = json_decode($succ,true);  
42 - #if($succ['data']){  
43 - # return $result = ['code'=>1,'msg'=>'评论成功!','data'=>$data,'rel'=>1];#  
44 - #}else{ 41 + $succ = json_decode($succ,true);
  42 + if($succ['data']){
  43 + return $result = ['code'=>1,'msg'=>'评论成功!','data'=>$data,'rel'=>1];#
  44 + }else{
45 return $result = ['code'=>0,'msg'=>'评论失败!','data'=>$data,'fail'=>$succ];# 45 return $result = ['code'=>0,'msg'=>'评论失败!','data'=>$data,'fail'=>$succ];#
46 - #} 46 + }
47 47
48 } 48 }
49 return $this->fetch(); 49 return $this->fetch();