去重
This commit is contained in:
@@ -85,8 +85,18 @@ export default {
|
||||
item.imgList = item.textarea05.split('|')
|
||||
item.imgIndex = Math.floor(Math.random() * 4)
|
||||
})
|
||||
this.list = res.data.records
|
||||
console.log(this.list)
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user