Skip to content

Commit

Permalink
update the replies history page
Browse files Browse the repository at this point in the history
add showing post category and author reputation. add clicking function to for navigating to post detail page
  • Loading branch information
Cha0s0000 committed Apr 9, 2018
1 parent e6b123b commit bd7f23a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pages/replyHistory/replyHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Page({
for (var content in data) {
var obj = new Object();
obj.author = data[content].author;
obj.parent_author = data[content].root_author;
obj.root_author = data[content].root_author;
obj.avatar = "https://steemitimages.com/u/" + obj.author + "/avatar/small";
obj.root_permlink = data[content].root_permlink;
obj.category = data[content].category;
Expand Down Expand Up @@ -196,4 +196,14 @@ Page({
return getTimeData;
}
},
click: function (e) {
var author = e.currentTarget.dataset.block.root_author;
var permlink = e.currentTarget.dataset.block.root_permlink;
console.log("click");
console.log(author);
wx.navigateTo({
url: '../detail/detail?author=' + author + '&permlink=' + permlink,
})

}
})
2 changes: 2 additions & 0 deletions pages/replyHistory/replyHistory.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<view class="post-author-data">
<image class="post-avatar" src="{{item.avatar}}"></image>
<text class="post-author">{{item.author}}</text>
<text class= "reputation">({{item.reputation}})</text>
<text class= "category">在 {{item.category}}</text>
<view class ="dot"></view>
<text class="time">{{item.time}}</text>
</view>
Expand Down

0 comments on commit bd7f23a

Please sign in to comment.