// 随机排列 function shuffle(arr) { let i = arr.length; while (i) { let j = Math.floor(Math.random() * i--); [arr[j], arr[i]] = [arr[i], arr[j]]; } } // 渲染数据 function renderlink(data) { var name, avatar, site, li = ""; shuffle(data); for (var i = 0; i < data.length; i++) { name = data[i].name; avatar = data[i].avatar; site = data[i].site; li += '