import { getCommentList } from '../../../../../../api/reality' Component({ properties: { eventId: { type: String, value: '', observer: function (value) { if (value) { this.getCommentList(value) } } } }, data: { list: [ ] }, methods: { getCommentList(eventId: string) { let that = this let params = { eventId, pageIndex: 1, pageSize: 10, orderType: '1' } getCommentList(params).then( (res: any) => { console.log(res) that.setData({ list: res.data }) }) } } })