Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
deancn committed Apr 27, 2019
1 parent 3b28fc7 commit 85212bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .wepycache

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/topicList.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

// 格式化updated_at
topics.forEach(function (topic) {
topic.updated_at_diff = util.diffForHumans(topic.updated_at)
topic.updated_at_diff = util.diffForHumans(topic.UpdatedAt)
})
// 如果传入参数 reset 为true,则覆盖 topics
this.topics = reset ? topics : this.topics.concat(topics)
Expand Down
6 changes: 3 additions & 3 deletions src/pages/topics/show.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ page{
<view class="weui-panel__bd">
<repeat for="{{ topic.topReplies.data }}" wx:key="id" index="index" item="reply">
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<navigator class="weui-media-box__hd weui-media-box__hd_in-appmsg" url="/pages/users/show?id={{ reply.user.id }}">
<navigator class="weui-media-box__hd weui-media-box__hd_in-appmsg" url="/pages/users/show?id={{ reply.user.ID }}">
<image class="replyer-avatar weui-media-box__thumb" src="{{ reply.user.avatar }}" />
</navigator>
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
Expand Down Expand Up @@ -126,11 +126,11 @@ page{
let topic = topicResponse.data

// 格式化 updated_at
topic.updated_at_diff = util.diffForHumans(topic.updated_at)
topic.updated_at_diff = util.diffForHumans(topic.UpdatedAt)

// 处理回复数据的发布时间
topic.topReplies.data.forEach(function (reply) {
reply.created_at_diff = util.diffForHumans(reply.created_at)
reply.created_at_diff = util.diffForHumans(reply.CreatedAt)
})

this.topic = topic
Expand Down
4 changes: 2 additions & 2 deletions src/pages/users/show.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
</view>
</view>

<navigator class="weui-cell weui-cell_access user-links" url="/pages/topics/userIndex?user_id={{ user.id }}">
<navigator class="weui-cell weui-cell_access user-links" url="/pages/topics/userIndex?user_id={{ user.ID }}">
<view class="weui-cell__bd">
<view class="weui-cell__bd">Ta 的话题</view>
</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<navigator class="weui-cell weui-cell_access" url="/pages/replies/userIndex?user_id={{ user.id }}">
<navigator class="weui-cell weui-cell_access" url="/pages/replies/userIndex?user_id={{ user.ID }}">
<view class="weui-cell__bd" url="">
<view class="weui-cell__bd">Ta 的回复</view>
</view>
Expand Down

0 comments on commit 85212bc

Please sign in to comment.