Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
ecitlm committed Aug 21, 2017
2 parents b5379bc + 1c83455 commit ab03bda
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 48 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -7,6 +7,10 @@ splider_img
.gitignore
apps/wx/
apps/wx
<<<<<<< HEAD
payInterface_native/
payInterface_native/*
payInterface_native
payInterface_native
=======
runtime/*
>>>>>>> 1c834552a00119bbd52a8c11dccedf3e21dcc97a
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
TP5_Splider
TP5_Splider Api
===============


Expand All @@ -11,7 +11,7 @@ TP5_Splider
+ 段子笑话接口
·

> ThinkPHP5的运行环境要求PHP5.4以上
> ThinkPHP5的运行环境要求PHP5.4 以上
## 下载

```
Expand Down
7 changes: 2 additions & 5 deletions apps/api/controller/Splider.php
Expand Up @@ -45,16 +45,15 @@ public function splider()

public function osc(){
$page = (isset($_GET['page'])) ? intval($_GET ['page']) : 1;
$url="https://my.oschina.net/Katyhu/home?type=tweet&scope=all&showme=NOTSHOW&p={$page}&temp=1500024889206";
// $id = (isset($_GET['id'])) ? intval($_GET ['id']) : 1;
$url="https://my.oschina.net/u/2921900/home?type=tweet&scope=all&showme=NOTSHOW&p={$page}&temp=1500024889206";
$res = HttpGet($url);
\phpQuery::newDocumentHTML($res);
$arr = array();
$list = pq('.photo')->find("img");

foreach ($list as $li) {
$img = pq($li)->attr('data-raw-img');


$tmp = array(
'img' => $img
);
Expand All @@ -66,8 +65,6 @@ public function osc(){
'data' => $arr
]);


//tweet-img
}


Expand Down
15 changes: 13 additions & 2 deletions apps/api/controller/Web.php
Expand Up @@ -73,7 +73,7 @@ public function every_daily_list()
$arr = array();
$list = pq('.feddaily-list li');

$every_daily_title=pq('.entry-title a')->text();
$every_daily_title = pq('.entry-title a')->text();
foreach ($list as $li) {
$title = pq($li)->find('.fed-title a')->text();
$desc = pq($li)->find('.fed-con')->text();
Expand All @@ -90,8 +90,19 @@ public function every_daily_list()
return json([
'msg' => 'success',
'code' => 1,
'title'=>$every_daily_title,
'title' => $every_daily_title,
'data' => $arr
]);
}


public function frame()
{
$url = "http://orz7qm1c9.bkt.clouddn.com/frame.html";
$data = Http_Spider($url);
return $data;

}


}
6 changes: 4 additions & 2 deletions docs/README.md
Expand Up @@ -8,7 +8,9 @@ TP5_Splider
+ 新闻分类(头条/军事/娱乐/体育/科技/艺术/教育/要闻)数据接口
+ 视频分类(精品视频/搞笑视频/美女视频/体育视频/新闻现场)接口
+ 图片(cosplay)接口
+ 段子笑话接口
+ 笑话段子、搞笑图片接口
+ 酷狗音乐API数据
·
·

> ThinkPHP5的运行环境要求PHP5.4以上。
Expand Down Expand Up @@ -1077,4 +1079,4 @@ httpd.conf配置文件中加载了mod_rewrite.so模块 //在APACHE里面去配
**调用例子:**
`http://www.xxx.com/index.php/api/Movie/movie_info?id=6311303`

返回数据(每次返回数据,这里就不全部列出来了)如下图:
返回数据(每次返回数据,这里就不全部列出来了)如下图:
20 changes: 0 additions & 20 deletions tests/ExampleTest.php

This file was deleted.

16 changes: 0 additions & 16 deletions tests/TestCase.php

This file was deleted.

0 comments on commit ab03bda

Please sign in to comment.