去重
This commit is contained in:
@@ -85,8 +85,18 @@ export default {
|
|||||||
item.imgList = item.textarea05.split('|')
|
item.imgList = item.textarea05.split('|')
|
||||||
item.imgIndex = Math.floor(Math.random() * 4)
|
item.imgIndex = Math.floor(Math.random() * 4)
|
||||||
})
|
})
|
||||||
|
if(this.tabIndex == 1 && this.cityType == 0) {
|
||||||
|
const areas = {}
|
||||||
|
res.data.records.map(e=>{
|
||||||
|
if(!areas[e.input00]){
|
||||||
|
const {input00,input01,imgList,imgIndex} = e
|
||||||
|
areas[e.input00] = {input00,input01,imgList,imgIndex}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.list = Object.values(areas)
|
||||||
|
}else {
|
||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
console.log(this.list)
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user