数组对象去重
const distinct = (arr, key) => {
for (let i = 0; i < arr.length; i++) {
for (let j = i + 1; j < arr.length; j++) {
if (arr[i][key] === arr[j][key]) {
arr.splice(j, 1)
j = j - 1
}
}
}
return arr
}