// 去重
deduplicateArray(arr, props) {
return arr.reduce((result, obj) => {
const existingObj = result.find(item => item[props] === obj[props]);
if (!existingObj) {
result.push(obj);
}
return result;
}, []);
}