# 分类列表中的原始发帖人

**URL:** <https://meta.discourse.org/t/original-posters-within-a-category-list/151511>\
**Category:** Product Support\
**Created:** [2020 年5 月 14 日 16:50 UTC](https://meta.discourse.org/t/original-posters-within-a-category-list/151511 "2020-05-14T16:50:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2020 年5 月 16 日 02:50 UTC](https://meta.discourse.org/t/original-posters-within-a-category-list/151511/2 "2020-05-16T02:50:42Z")

</div>

好的，你需要拉取用户数据……你可以将 topicListThree 部分编辑为：

```js
  ajax("/latest.json?order=posts&ascending=true").then (function(result){
                     topicListThree = [];
                    var usersThree = result.users;
                    result.topic_list.topics.slice(0,3).forEach(function(topic){
                        topic.posters.forEach(function(poster){
                            poster.user = $.grep(usersThree, function(e){ return e.id == poster.user_id; })[0];
                        });
                        topicListThree.push(Topic.create(topic));
                    });
                    component.set('topicListThree', topicListThree);
                });

```

然后在模板中，你可以将 img src 中的 `{{topic.last_poster_username}}` 部分替换为 `{{topic.posters.[0].user.username}}`

---

_[View the full topic](https://meta.discourse.org/t/original-posters-within-a-category-list/151511)._
