|
5 | 5 |
|
6 | 6 | ### 1 宝贝回家/腾讯公益404核心数据 |
7 | 7 | **接口地址:** |
8 | | - `https://api.isoyu.com/gy/` |
9 | | - `https://api.isoyu.com/gy/data.js` |
| 8 | + `https://api.isoyu.com/gy/api.php` |
10 | 9 |
|
11 | 10 | **说明:** |
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 |
13 | 16 |
|
14 | 17 | **附:** |
15 | 18 | 传播即是希望!如果您想在您的网站添加一个类似的效果,出于公益性质,我可以无偿为您提供技术支持,愿天下的宝贝都能永伴自己父母身边.法律顾问:北京市百瑞律师事务所 张志伟律师 | 吉林保民律师事务所 修保律师 |
16 | 19 |
|
17 | 20 | **调用例子:** |
18 | 21 |
|
| 22 | +https://api.isoyu.com/gy/demo.html |
19 | 23 |
|
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 | +``` |
25 | 28 |
|
| 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 | +} |
26 | 51 | ``` |
27 | 52 |
|
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 | +#### 挂件引用方式 |
31 | 54 |
|
32 | | -``` |
33 | | -或者用onload来动态加载高度 |
| 55 | +##### 方式1:iframe 嵌入 |
34 | 56 |
|
35 | | -```javascript |
| 57 | + |
36 | 58 |
|
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> |
38 | 66 |
|
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 | +``` |
40 | 71 |
|
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 | +``` |
46 | 77 |
|
| 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 | + }); |
47 | 86 | ``` |
48 | | -3.解析json https://api.isoyu.com/gy/data.js 不作多描述(浏览器直接访问会乱码,可以下载查看。charset为UTF-8) |
49 | 87 |
|
50 | 88 |  |
51 | 89 | ### 2 全网通缉令数据 |
|
0 commit comments