// 數(shù)組去重 arr:數(shù)組;key:根據(jù)數(shù)組中為key的鍵名去重
? ? filterArr(arr, key) {
? ? ? const hash = {};
? ? ? return arr.reduce((ss, item) => {
? ? ? ? hash[item[key]] ? '' : (hash[item[key]] = true && ss.push(item));
? ? ? ? return ss;
? ? ? }, []);
? ? },