当前位置: 首页 > news >正文

陵水建设局网站中国十大云计算公司排名

陵水建设局网站,中国十大云计算公司排名,泉州市建设工程交易网站,住建局查询系统目录 1.随机中英文句子 2.随机中英文句子(带图片和音频) 3.随机一句诗 4.随机一句话 5.随机一句情话 6. 随机一句舔狗语录 7.历史上的今天 8.获取来访者ip地址 9:获取手机号信息 10. 垃圾分类查询 11.字典查询 12.QQ信息查询 1.随…

目录

1.随机中英文句子

2.随机中英文句子(带图片和音频)

3.随机一句诗

4.随机一句话

5.随机一句情话

6. 随机一句舔狗语录

7.历史上的今天

8.获取来访者ip地址

9:获取手机号信息

10. 垃圾分类查询

11.字典查询

12.QQ信息查询


1.随机中英文句子

 API地址:https://api.kekc.cn/api/yien

Axios的get请求调用方式

  methods:{getit(){axios.get('https://api.kekc.cn/api/yien', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data.cn);this.cn = response.data.cn;this.en = response.data.en;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


2.随机中英文句子(带图片和音频)

API地址:https://api.oioweb.cn/api/common/OneDayEnglish

 Axios的get请求调用方式

  methods:{getit(){axios.get('https://api.oioweb.cn/api/common/OneDayEnglish', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.cn = response.data.result.note;this.en = response.data.result.content;this.imgurl = response.data.result.img;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


3.随机一句诗

API地址:https://v1.jinrishici.com/rensheng.txt

Axios的get请求调用方式

  methods:{getit(){axios.get('https://v1.jinrishici.com/rensheng.txt', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.cn = response.data;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


4.随机一句话

API地址:

https://api.kekc.cn/api/yiyan

https://api.kekc.cn/api/wawr

Axios的get请求调用方式

  methods:{getit(){axios.get('https://api.kekc.cn/api/yiyan', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.cn = response.data;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


5.随机一句情话

API地址:https://api.uomg.com/api/rand.qinghua

Axios的get请求调用方式

  methods:{getit(){axios.get('https://api.uomg.com/api/rand.qinghua', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.cn = response.data.content;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


6. 随机一句舔狗语录

API地址:http://api.kekc.cn/api/tiangou

Axios的get请求调用方式

  methods:{getit(){axios.get('http://api.kekc.cn/api/tiangou', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.cn = response.data;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


7.历史上的今天

API地址:https://api.oioweb.cn/api/common/history

Axios的get请求调用方式(需要注意的是会生成数组,此处仅使用了第一个元素)

  methods:{getit(){axios.get('https://api.oioweb.cn/api/common/history', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.year = response.data.result[0].year;this.title = response.data.result[0].title;this.link = response.data.result[0].link;this.desc = response.data.result[0].desc;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

 获取结果示例:


8.获取来访者ip地址

API地址:https://api.kekc.cn/api/getip

Axios的get请求调用方式

  methods:{getit(){axios.get('http://api.kekc.cn/api/getip', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.ipadd = response.data;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:

 


9:获取手机号信息

API地址:https://api.oioweb.cn/api/common/teladress?mobile=10086

Axios的get请求调用方式(需要注意的是该api需要后缀11位手机号作为参数)

  methods:{getit(){axios.get('https://api.oioweb.cn/api/common/teladress?mobile=15990000000', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.prov = response.data.result.prov;this.city = response.data.result.city;this.name = response.data.result.name;this.postcode = response.data.result.postCode;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

获取结果示例:


10. 垃圾分类查询

API地址:https://api.oioweb.cn/api/common/rubbish?name=香蕉

Axios的get请求调用方式(需要注意的是该api需要后缀要查询的垃圾名称作为参数)

  methods:{getit(){axios.get('https://api.oioweb.cn/api/common/rubbish?name=香蕉', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.contain = response.data.result[0].contain;this.explain = response.data.result[0].explain;this.name = response.data.result[0].name;this.tip = response.data.result[0].tip;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

 获取结果示例:


11.字典查询

API地址:https://api.oioweb.cn/api/txt/dict?text=棒

 Axios的get请求调用方式(需要注意的是该api需要后缀要查询的字作为参数)

  methods:{getit(){axios.get('https://api.oioweb.cn/api/txt/dict?text=棒', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.pinyin = response.data.result.pinyin;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

需要注意的是get到的结果中包含了基础释义和详细释义,可视情况获取,本例中只取用拼音

 获取结果示例:


12.QQ信息查询

APD地址:https://api.oioweb.cn/api/qq/info?qq=12345

 Axios的get请求调用方式(需要注意的是该api需要后缀要查询的QQ号作为参数)

  methods:{getit(){axios.get('https://api.oioweb.cn/api/qq/info?qq=12345', {params: {// 请求参数}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.age = response.data.result.age;this.nickname = response.data.result.nickname;this.sex = response.data.result.sex;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

 获取结果示例:


补充:

在需要参数的API中可以使用params传递参数,例如12中可以在页面中添加输入框,再在js中拿到输入框的值并传递给axios请求地址中获取结果:

    <input type="text" id="qqInput"><button @click="getit()">发送请求</button>methods:{getit(){var qq = document.getElementById('qqInput').value;axios.get('https://api.oioweb.cn/api/qq/info', {params: {// 请求参数qq:qq}}).then( (response)=> {// 请求成功回调函数console.log(response.data);this.age = response.data.result.age;this.nickname = response.data.result.nickname;this.sex = response.data.result.sex;}).catch(function (error) {//请求失败回调函数console.log(error);});},}

 获取结果示例:


未完待续... (侵删)

http://www.yayakq.cn/news/906161/

相关文章:

  • dw如何做商业网站cpa单页网站怎么做
  • 付费电影网站源码私募基金网站怎么做seo
  • jsp是否可以做网站wordpress模板哪里买
  • 电子商务网站开发方式建设银行假网站
  • 辽宁公司网站建设网站制作软件下载
  • 中色冶金建设有限公司网站站长统计幸福宝2022年排行榜
  • 免费开源企业网站做网站su
  • 网站建设前期分析的内容建网站公司联系方式
  • 网站怎么做多级菜单wordpress连续id
  • 写资料的网站有哪些wordpress运行死慢
  • 做网站 excel有创意的设计作品
  • 谁有人和兽做的网站wordpress 地方生活
  • 学校网站设计首页网站开发重点难点分析
  • 西宁做腋臭北大网站Y做外贸门户网站
  • 免费建网站系统平台成都制作开发小程序
  • wordpress做购物网站奉节网站建设
  • apache建设多个网站菏泽市住房和建设局网站
  • 网站开发的报告书建设班级网站 沟通无限
  • 太平鸟品牌门户网站建设个人网站怎么做代码
  • 免费的网站入口在哪越秀网站建设优化
  • 做网站的原理跨境电商app排行
  • 网站与服务器的关系电子商务公司名称起名
  • 做网站的设计理念合肥网站建设代理商
  • 网站的建站方案跨境电商网站建设流程成都市公服
  • 怎么把网页放到网站上杭州品牌推广
  • 属于seo优化范畴的是衡阳seo服务
  • 湖南营销型网站建设多少钱wordpress 建站群
  • 长沙专业网站建设公司排名九里徐州网站开发
  • 网站描述 修改青海省建设厅网站备案资料
  • 简单的个人网站模板江苏百度推广代理商