Spaces:
Runtime error
Runtime error
File size: 2,516 Bytes
3b8d454 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
$(function(){
tabFlagMap["furnace"] = false;
tabFuncMap.furnace = function(){
var index = 1;
var furnaceUnFindMsg = "没有找到装备,一定是你没充值VIP!";
if(curVersionIndex==""){
furnaceUnFindMsg = "作者不想给你们看~";
}else{
$.each(furnacetable,function(key,map){
var tr = $("<tr align='center'></tr>");
$("#furnaceTable tbody").append(tr);
var materialName = $("<td></td>").append(findMapTips(map.ID).append("×"+map["需求数"]));
var target = $("<td></td>").append(map["精元对象"]<0?"任意怪物×"+map["精元数"]:findMapTips(map["精元对象"]).append("×"+map["精元数"]));
var product = $("<td></td>").append(findMapTips(map["产物"]));
var product1 = $("<td></td>");
if(map["变异1"]>0){
product1 = $("<td></td>").append(findMapTips(map["变异1产物"]).append("("+map["变异1"]+")"));
}
var product2 = $("<td></td>");
if(map["变异2"]>0){
product2 = $("<td></td>").append(findMapTips(map["变异2产物"]).append("("+map["变异2"]+")"));
}
var effect = $("<td>"+map.DESCRIPT+"</td>");
var base = $("<td></td>");
if(map["基数"]>0){
base.append(map["基数"]);
}
tr.append($("<td>"+map.INDEX+"</td>"));
tr.append("<td>"+index+"</td>");
tr.append(materialName);
tr.append(target);
tr.append(effect);
tr.append(base);
tr.append(product);
tr.append(product1);
tr.append(product2);
materialName.append("<span style='display:none;'>"+map["PY"]+"</span>");
index++;
});
}
/*furnaceTable*/
$('#furnaceTable').dataTable( {
"pagingType": "full_numbers",
"language": {
"lengthMenu": "每页 _MENU_ 条记录",
"zeroRecords": furnaceUnFindMsg,
"info": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )",
"infoEmpty": "没有装备",
"infoFiltered": "(从 _MAX_ 条装备过滤)",
"search": "搜索(可用<font color='red'>原料</font>首字母):",
"paginate": {
"first": "首页<font color=red>(W)</font>",
"last": "末页<font color=red>(S)</font>",
"next": "下一页<font color=red>(D)</font>",
"previous": "上一页<font color=red>(A)</font>"
},
},
// 默认按照索引排序,且隐藏索引列
"order": [[ 0, "asc" ]],
"columnDefs": [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
},
]
});
$('#furnaceTable th').css("text-align","center");
}
}); |