|
@@ -465,13 +465,10 @@ class WeixinService extends Service
|
|
|
|
|
|
public function getArticleList($data){
|
|
|
list($status, $msg) = $this->rule($data);
|
|
|
- if(! $status) {
|
|
|
- file_put_contents('record_ip.txt',date("Y-m-d H:i:s",time()).json_encode($data) . PHP_EOL."来源IP".$msg.PHP_EOL,8);
|
|
|
- return [false, 'IP未入白名单'];
|
|
|
- }
|
|
|
+// if(! $status) return [false, 'IP未入白名单'];
|
|
|
|
|
|
$model = WxArticleDetail::where('del_time',0)
|
|
|
- ->where('is_deleted', 'false')
|
|
|
+ ->where('is_deleted', 0)
|
|
|
->select('title','author','digest','thumb_url','id')
|
|
|
->orderBy('crt_time','desc');
|
|
|
|
|
@@ -480,11 +477,11 @@ class WeixinService extends Service
|
|
|
//组织数据
|
|
|
$list = $this->organizationData($list);
|
|
|
|
|
|
- return [true , $list];
|
|
|
+ return [true, $list];
|
|
|
}
|
|
|
|
|
|
public function organizationData($data){
|
|
|
- if(empty($data['data'])) return [true, $data];
|
|
|
+ if(empty($data['data'])) return $data;
|
|
|
|
|
|
foreach ($data['data'] as $key => $value){
|
|
|
$my_thumb_url = "";
|
|
@@ -492,7 +489,7 @@ class WeixinService extends Service
|
|
|
$data['data'][$key]['my_thumb_url'] = $my_thumb_url;
|
|
|
}
|
|
|
|
|
|
- return [true, $data];
|
|
|
+ return $data;
|
|
|
}
|
|
|
|
|
|
public function getArticleContent($data){
|