gpt4 book ai didi

小案例:王者荣耀战力查询系统(免费调用外部接口

转载 作者:知者 更新时间:2024-03-12 23:22:18 25 4
gpt4 key购买 nike

一、查询网址(点击):

王者战力查询-王者战力排行榜

二、战力查询接口:

接口调用:
https://www.jk.cxkf.cc/api_select.php

参数:
hero:英雄名字
type:qq、wx、ios_qq、ios_wx

qq:安卓QQ区
wx:安卓微信区
ios_qq:苹果QQ区
ios_wx:苹果微信区

示例:
https://jk.cxkf.cc/api_select.php?hero=武则天&type=wx

结果:

{
  "code": 200,
  "data": {
    "id": "118",
    "fid": "30",
    "name": "武则天",
    "alias": "女帝-武则天",
    "photo": "https://game.gtimg.cn/images/yxzj/img201606/heroimg/136/136.jpg",
    "area": "麟游县",
    "areaPower": "1000",
    "city": "新余市",
    "cityPower": "3458",
    "province": "台湾省",
    "provincePower": "6437",
    "platform": "安卓-微信区",
    "stamp": "1637773082",
    "updatetime": "2021/11/25 00:58:02",
    "clientIP": "106.52.60.110",
    "type": "wx"
  }
}

 三、查询结果:

四、源码下载:

王者小程序源码
1.0.0版本微云下载
https://share.weiyun.com/9zhGFvyZ
1.0.1版本微云下载
https://share.weiyun.com/PXnIWw2a
或百度云链接:
https://pan.baidu.com/s/1N8Kg4Bf6kYxPoWOSBUN-_w 
提取码:yzkj 

文件解压密码:wzzlphb

五、部分代码:

// 技术支持微信titi3241

var t = null, e = getApp();

Page({
    data: {
        showModel: !1,
        herolist: null,
        heroInfo: null,
        currHero: null,
        swiperList: e.globalData.swiperList
    },
    onLoad: function(e) {
        wx.createInterstitialAd && ((t = wx.createInterstitialAd({
            // 插屏广告id
            adUnitId: "adunit-45dd04e58aca0595"
        })).onLoad(function() {}), t.onError(function(t) {}), t.onClose(function() {}));
        var o = this;
        wx.showLoading({
            title: "大招CD中..."
        }), wx.request({
            url: "https://jk.cxkf.cc/api_herolist.php",
            header: {
                "Content-Type": "application/json"
            },
            success: function(t) {
                200 == t.data.code && o.setData({
                    herolist: t.data.data
                });
            },
            complete: function() {
                wx.hideLoading();
            }
        });
    },
    onShow: function() {
        t && t.show().catch(function(t) {
            console.error(t);
        });
    },
    findHero: function(t) {
        var e = this;
        wx.showLoading({
            title: "大招CD中..."
        });
        var o = t.currentTarget.dataset.hero;
        "" == o ? wx.showToast({
            title: "没有找到相关英雄",
            icon: "info"
        }) : (e.setData({
            currHero: o
        }), wx.request({
            url: "https://jk.cxkf.cc/api_select.php?hero=" + o + "&type=wx",
            header: {
                "Content-Type": "application/json"
            },
            success: function(t) {
                if (200 == t.data.code) {
                    var o = t.data.data;
                    e.showModal(o);
                } else wx.showToast({
                    title: "请求失败",
                    icon: "info"
                });
            },
            complete: function() {
                wx.hideLoading();
            }
        }));
    },
    showModal: function(t) {
        this.setData({
            heroInfo: t,
            showModel: !0
        });
    },
    hideModal: function() {
        this.setData({
            heroInfo: null,
            showModel: !1
        });
    },
    
// 技术支持微信titi3241

    onShareAppMessage: function() {
        return {
            title: "免费查王者荣耀战力排行榜,助你最低战力上榜!快速拿标!",
            path: "/pages/qq/index",
            imageUrl: "https://cy.wen1024.com/img/wzqs/share.png"
        };
    },
    onShareTimeline: function() {
        return {
            title: "免费查王者荣耀战力排行榜,助你最低战力上榜!快速拿标!",
            path: "/pages/qq/index"
        };
    }
});

// 技术支持微信titi3241

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com