Skip to content
/ API Public template

Commit 78be5fb

Browse files
authored
Update 公益中国.md
1 parent 1aa57ad commit 78be5fb

1 file changed

Lines changed: 60 additions & 22 deletions

File tree

docs/guide/公益中国.md

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,85 @@
55

66
### 1 宝贝回家/腾讯公益404核心数据
77
**接口地址:**
8-
`https://api.isoyu.com/gy/`
9-
`https://api.isoyu.com/gy/data.js`
8+
`https://api.isoyu.com/gy/api.php`
109

1110
**说明:**
12-
腾讯公益404应该很多人都知道,在独立开发者圈内取得了很大的成功!但我认为这个公益页面不应该局限于404页面,而是广告位类单独板块。这才是真正的公益行为!现在几乎所有网站都是HTTPS(Hypertext Transfer Protocol Secure)安全超文本传输协议,而腾讯还停留在http时代,腾讯公益404难以满足现有需求。所以做了这个,网站只需要在自己的页面中嵌入一段简单的代码,就能通过互联网来迅速传播失踪儿童信息,从而提高找回失踪儿童的概率。失踪儿童信息来自宝贝回家寻子网。在全国人大代表张宝艳女士指导建议下完善.静态资源支持ssl.最后信息于2018年04月14日更改,共232条信息。
11+
腾讯公益404应该很多人都知道,在独立开发者圈内取得了很大的成功!但我认为这个公益页面不应该局限于404页面,而是广告位类单独板块。这才是真正的公益行为!现在几乎所有网站都是HTTPS,而腾讯还停留在http时代,腾讯公益404难以满足现有需求。所以做了这个,网站只需要在自己的页面中嵌入一段简单的代码,就能通过互联网来迅速传播失踪儿童信息,从而提高找回失踪儿童的概率。失踪儿童信息来自宝贝回家寻子网。在全国人大代表张宝艳女士指导建议下完善.静态资源支持ssl.
12+
更新:腾讯支持了SSL,
13+
脚本每周一会自动采集网站数据.
14+
宝贝回家1.2W条左右图片和信息数据链接:https://pan.baidu.com/s/1-rTi3pDHrQqvmN5Sc6DYoA
15+
提取码:ut68
1316

1417
**附:**
1518
传播即是希望!如果您想在您的网站添加一个类似的效果,出于公益性质,我可以无偿为您提供技术支持,愿天下的宝贝都能永伴自己父母身边.法律顾问:北京市百瑞律师事务所 张志伟律师 | 吉林保民律师事务所 修保律师
1619

1720
**调用例子:**
1821

22+
https://api.isoyu.com/gy/demo.html
1923

20-
1.
21-
22-
```javascript
23-
24-
<iframe src="https://api.isoyu.com/gy/" frameborder="0" scrolling="no" width="300" height="500" sandbox="allow-scripts"></iframe>
24+
##### 请求方式
25+
```bash
26+
GET https://api.isoyu.com/gy/api.php
27+
```
2528

29+
##### 返回格式
30+
```json
31+
{
32+
"success": true,
33+
"data": {
34+
"id": "448061",
35+
"name": "李瑾怡",
36+
"sex": "",
37+
"birth_time": "2004年02月17日",
38+
"lost_time": "2020年01月01日",
39+
"child_pic": "https://...",
40+
"lost_place": "湖北省荆州市监利县容城镇",
41+
"url": "https://...",
42+
"child_feature": "..."
43+
},
44+
"contacts": {
45+
"consult_mail": "baobeihuijia@yeah.net",
46+
"tel": "0435-3338090"
47+
},
48+
"name": "姬长信API",
49+
"api": "https://api.isoyu.com/"
50+
}
2651
```
2752

28-
2.
29-
```javascript
30-
<iframe src="https://api.isoyu.com/gy/" allowTransparency="true" frameborder="0" scrolling="no" width="100%" height="100%" sandbox="allow-scripts"></iframe>
53+
#### 挂件引用方式
3154

32-
```
33-
或者用onload来动态加载高度
55+
##### 方式1:iframe 嵌入
3456

35-
```javascript
57+
![姬长信API](https://api.isoyu.com/gy/bbhjtestwidget.png)
3658

37-
<iframe src="https://api.isoyu.com/gy/" frameborder="0" scrolling="no" width="100%" onload="mu_changeHeight()" id="isoyu_gy" sandbox="allow-scripts"></iframe>
59+
```html
60+
<!-- 固定宽度 -->
61+
<iframe src="https://api.isoyu.com/gy/widget.html"
62+
width="240"
63+
height="500"
64+
frameborder="0"
65+
scrolling="no"></iframe>
3866

39-
js部分
67+
<!-- 响应式 -->
68+
<iframe src="https://api.isoyu.com/gy/widget.html"
69+
style="width:100%;max-width:280px;height:500px;border:none;"></iframe>
70+
```
4071

41-
<script type="text/javascript">
42-
function mu_changeHeight(){
43-
var ifm= document.getElementById("isoyu_gy");
44-
ifm.height=document.documentElement.clientHeight;
45-
}</script>
72+
##### 方式2:JavaScript 引用
73+
```html
74+
<!-- 在需要显示的位置添加 -->
75+
<script src="https://api.isoyu.com/gy/widget.js"></script>
76+
```
4677

78+
##### 方式3:直接调用 API
79+
```javascript
80+
fetch('https://api.isoyu.com/gy/api.php')
81+
.then(res => res.json())
82+
.then(data => {
83+
console.log(data);
84+
// 自定义处理数据
85+
});
4786
```
48-
3.解析json https://api.isoyu.com/gy/data.js 不作多描述(浏览器直接访问会乱码,可以下载查看。charset为UTF-8)
4987

5088
![姬长信API](https://api.isoyu.com/gy/5ac1eb7a3cbc7.png)
5189
### 2 全网通缉令数据

0 commit comments

Comments
 (0)