Commit a7d276c8 authored by 罗林杰's avatar 罗林杰

修改bug

parent 1b600be0
......@@ -158,15 +158,17 @@
}
topicList(form).then(res =>{
//获取res.data.data里的topicName赋值给this.topicList,并且
this.topicList = res.data.data.map(item => {
return {
id:item.businessId,
name: item.topicName
};
});
//初始化话题id 锁到第一个话题
this.topicId = this.topicList[0].id
this.$emit('topicId', this.topicId)
if (res.data.data.length > 0){
this.topicList = res.data.data.map(item => {
return {
id:item.businessId,
name: item.topicName
};
});
//初始化话题id 锁到第一个话题
this.topicId = this.topicList[0].id
this.$emit('topicId', this.topicId)
}
})
},
// 接收父组件传过来的刷新列表要求
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment