网站每日一图实现

每日一图

为了方便随机切换图片,我们可以使用必应每日一图来参考写出接口,方便我们切换图片和收集图片。全新代码构建,全新界面。

页面展示

示例

1、效果

点击查看

2、一图接口(新增,速度快)

接口:POST请求

https://api.xygeng.cn/openapi/bing

结果:

{
  "code": 200,
  "data": {
    "id": 199,
    "time": "20221211",
    "title": "国际山岳日",
    "url": "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
    "urlbase": "/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552",
    "copyright": "泰根塞山脉Roßstein山顶的景色,德国巴伐利亚州 (© Christian Bäck/eStock Photo)",
    "copyrightlink": "https://www.bing.com/search?q=%E5%BE%B7%E5%9B%BD%E5%B7%B4%E4%BC%90%E5%88%A9%E4%BA%9A%E5%B7%9E&form=hpcapt&mkt=zh-cn",
    "urls": [
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1920x1080.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1366x768.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1280x768.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1024x768.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_800x600.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_800x480.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_768x1280.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_720x1280.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_640x480.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_480x800.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_400x240.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_320x240.jpg",
      "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_240x320.jpg"
    ]
  },
  "updateTime": 1670756951832
}
3、每日一图
<!-- html -->
<img src="https://api.xygeng.cn/openapi/bing/view" alt="">
<!-- markdown -->
![bing](https://api.xygeng.cn/bing/view)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值