此处公告通常对读者进行申明或对该WIKI某些规则进行公告,请在确认后修改本通告。本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~

全站通知:

Widget:游戏经验查询

来自黎明杀机WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索
Steam 64位ID

<input class="form-control" type="text" id="uid" maxlength=64 data-bind="value: Steam 64位ID">

<button class="dbd-section-normal section-wrap" type="button" onclick="getProfile()">查询</button>

<script> function getProfile() { $('#profile_info_list').children().remove();

$.ajax({
  type: "GET",
  url: "https://api.dbd.mcxk.net/profile/steam?uid="+ $("#uid").val(),
  dataType: "json",
  success: function(json){
    console.log(json);
    let killer_rank = json.find(x => x.key === "killer_rank")?.value;
    let survivor_rank = json.find(x => x.key === "survivor_rank")?.value;

$('#profile_info_list').append("

  • 杀手段位:"+ killer_rank?.rank_name + "
  • " ); $('#profile_info_list').append("

  • 逃生者段位:"+ survivor_rank?.rank_name + "
  • " ); $('#profile_info_list').append("

  • 击杀(如处决)逃生者:"+ json.find(x => x.key === "survivors_killed")?.value + "
  • " ); $('#profile_info_list').append("

  • 献祭逃生者:"+ json.find(x => x.key === "survivors_sacrificed")?.value + "
  • " ); $('#profile_info_list').append("

  • 修好发电机:"+ json.find(x => x.key === "generators_done")?.value + "台
  • " ); $('#profile_info_list').append("

  • 治疗完成次数:"+ json.find(x => x.key === "healing_done")?.value + "
  • " ); $('#profile_info_list').append("

  • 倒地后成功逃跑:"+ json.find(x => x.key === "escapes_in_dying_state")?.value + "次
  • " ); } }); } console.log("加载完成"); </script>