1,117
个编辑
小 (微调) |
小 (修改定数表排序逻辑) |
||
第54行: | 第54行: | ||
table.insert(rowData, { | table.insert(rowData, { | ||
data = {title, song.id, ({'PST', 'PRS', 'FTR', 'BYD'})[diffIdx], link = link, CC = diasplayCC}, | data = {title, song.id, ({'PST', 'PRS', 'FTR', 'BYD'})[diffIdx], link = link, CC = diasplayCC}, | ||
sort = {cc, date} | sort = {cc, diffIdx, date} | ||
}) | }) | ||
until (true) | until (true) | ||
第68行: | 第68行: | ||
table.sort(rowData, function(a, b) | table.sort(rowData, function(a, b) | ||
a, b = a.sort, b.sort | a, b = a.sort, b.sort | ||
if a[1] == b[ | if a[1] ~= b[1] then return a[1] > b[1] end | ||
return a[ | if a[2] ~= b[2] then return a[2] > b[2] end | ||
return a[3] < b[3] | |||
end) | end) | ||
for _, rowItem in ipairs(rowData) do | for _, rowItem in ipairs(rowData) do |
个编辑