1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < title > 随机图片api</ title >
6+ < meta charset ="utf-8 " />
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
8+ < link rel ="dns-prefetch " href ="https://cdn.jsdelivr.net/ ">
9+ < link rel ="preload " href ="https://cdn.jsdelivr.net/gh/kylelogue/mustard-ui/dist/css/mustard-ui.min.css " as ="style ">
10+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/gh/kylelogue/mustard-ui/dist/css/mustard-ui.min.css " />
11+ < script src ="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js "> </ script >
12+ < script >
13+ $ ( document ) . ready ( function ( ) {
14+
15+ $ ( '.scroll-down, .get-started' ) . on ( 'click' , function ( e ) {
16+ e . preventDefault ( )
17+ $ ( 'html, body' ) . animate ( {
18+ scrollTop : $ ( 'section:first-of-type' ) . offset ( ) . top
19+ } , 300 )
20+ } )
21+
22+ } )
23+ </ script >
24+ < style >
25+ header {
26+ background : # a0e5e4
27+ }
28+
29+ .get-started {
30+ background : # 43ccc8 ;
31+ border : 3px solid # 50d0cc ;
32+ }
33+ </ style >
34+ </ head >
35+
36+ < body >
37+ < header >
38+ < h1 class ="title "> 随机图片api</ h1 >
39+ < h2 class ="subtitle "> 说明文档</ h2 >
40+ < p class ="disclaimer "> < a href ="show.html "> 图片一览</ a > </ p >
41+ < button class ="get-started button button-primary button-large "> 详情</ button >
42+ < a class ="scroll-down " href ="# "> </ a >
43+ </ header >
44+ < section >
45+ < h3 > < strong > 直接调用</ strong > </ h3 >
46+ < p > 访问./api即可,跳转至图片地址</ p >
47+ < p > 访问./api/?id=数字,跳转至指定图片</ p >
48+ < p > 注:api附加参数 api=数字 亦可跳转至指定图片</ p >
49+ < p > 如:< a href ="./api/?type=json&id=3 "> ./api/?type=json&id=3</ a > </ p >
50+ </ section >
51+ < section >
52+ < h3 > < strong > 访问< a href ="./api/?type=length "> ./api/?type=length</ a > </ strong > </ h3 >
53+ < p > 返回图片总量,即id的最大值</ p >
54+ </ section >
55+ < section >
56+ < h3 > < strong > 访问< a href ="./api/?type=output "> ./api/?type=output</ a > </ strong > </ h3 >
57+ < p > 服务器读取后输出,一般不建议使用,默认禁用</ p >
58+ </ section >
59+ < section >
60+ < h3 > < strong > 访问< a href ="./api/?type=json "> ./api/?type=json</ a > </ strong > </ h3 >
61+ < p > 服务器输出json</ p >
62+ < pre class ="language-json ">
63+ < code class ="language-json ">
64+ {"code":"200","url":"https:\/\/fp1.fghrsh.net\/2019\/07\/15\/c2549aaa63db078834ead6a92fe63b61.jpg"}
65+ </ code >
66+ </ pre >
67+ </ section >
68+ < section >
69+ < h3 > < strong > 访问< a href ="./api/?type=JSON "> ./api/?type=JSON</ a > </ strong > </ h3 >
70+ < p > 服务器读取图片信息后输出json,如非需要图片信息不建议使用</ p >
71+ < pre class ="language-json ">
72+ < code class ="language-json ">
73+ {"code":"200","url":"https:\/\/fp1.fghrsh.net\/2019\/07\/15\/c2549aaa63db078834ead6a92fe63b61.jpg","width":"1920","height":"1080","mime":"image\/jpeg","size":"821735"}
74+ </ code >
75+ </ pre >
76+ </ section >
77+ < footer >
78+ < p class ="copyright align-center "> Made by < a href ="https://blog.poo.li/ "> Crazy白茫茫</ a > . < a
79+ href ="https://github.com/Crazy-White/Random-Picture "> Github(Source Code)</ a > </ p >
80+ </ footer >
81+ <!--</body>-->
82+ </ body >
83+
84+ </ html >
0 commit comments