Commit 77e3b283 authored by IamI's avatar IamI

Fix

parent 3391b881
......@@ -213,7 +213,7 @@
},
watch: {
lang: function (val) {
console.log('lang change1', val)
// console.log('lang change1', val)
this.init2()
},
},
......@@ -287,13 +287,15 @@
type: $("#type").val(),
source: final_source
}, function (data) {
var obj = JSON.parse(data);
var obj = data;
if (typeof obj === 'string')
obj = JSON.parse(data);
var rank = 1;
var processData = obj.map(function (x) {
var tagStr = [];
var deckName = x.name;
for (var i = 0; i < x.tags.length; i++) {
var tagName = x.tags[i].name;
var tagName = x.tags[i].name || x.tags[i].toString() || "";
var short_tagName = tagName.replace(deckName + "-", "");
tagStr.push(short_tagName)
}
......@@ -335,7 +337,7 @@
var rank = 1;
var processData = tableData.map(function (d) {
return [rank++, d.name[langIndex], d.frequency, d.putone, d.puttwo, d.putthree, d.id];
return [rank++, d.name ? d.name[langIndex] : "未知卡片", d.frequency, d.putone, d.puttwo, d.putthree, d.id];
});
var table = $(tableID).DataTable({
......@@ -354,7 +356,7 @@
{
"render": function (data, type, row) {
// return "<span title='" + data + "'>" + data + "</span>";
return "<a href='?id=" + row[6] + "#/cardinfo'>" + data + "</a>";
return "<a href='https://www.ourocg.cn/search/" + row[6] + "/'>" + data + "</a>";
},
"targets": 1
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment