reduce去重
let uniarr = uniqObjInArray(this.refIdList);//数组
let obj = {};
let peon = uniarr.reduce((cur, next, idx) => {
console.log('next', obj[next.refId]);
// obj[next.refId] ? "" : obj[next.refId] = true && cur.push(next)
if (obj[next.refId] === undefined) {
obj[next.refId] = true;
cur.push(next);
}
return cur;
}, []); //设置cur默认类型为数组,并且初始值为空的数组
| peon是去重后的数组