From fd4fb7e273a6549849685139339072de278714ab Mon Sep 17 00:00:00 2001 From: Pomeloqy <1056805770@qq.com> Date: Sat, 2 Jun 2018 14:42:41 +0800 Subject: [PATCH 1/5] modify header color --- pages/comment/comment.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/comment/comment.json b/pages/comment/comment.json index 6868ca3..1c96a64 100644 --- a/pages/comment/comment.json +++ b/pages/comment/comment.json @@ -1,6 +1,6 @@ { "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#980000", + "navigationBarBackgroundColor": "#abd", "navigationBarTitleText": "评价", "navigationBarTextStyle": "white" } \ No newline at end of file From 7584d2ae3a7a232c5f49b206774f05ab881f39c2 Mon Sep 17 00:00:00 2001 From: Pomeloqy <1056805770@qq.com> Date: Sat, 2 Jun 2018 14:57:21 +0800 Subject: [PATCH 2/5] add data bind --- pages/comment/comment.js | 26 +++++++- pages/comment/comment.wxml | 122 ++++++++++++----------------------- pages/comment/comment.wxss | 2 +- pages/index/index.js | 13 +++- pages/index/index.wxml | 97 ++++++---------------------- pages/submit/submit.js | 12 +++- pages/submit/submit.wxml | 126 ++++++------------------------------- pages/submit/submit.wxss | 5 +- 8 files changed, 129 insertions(+), 274 deletions(-) diff --git a/pages/comment/comment.js b/pages/comment/comment.js index 4a943c9..5b9a74d 100644 --- a/pages/comment/comment.js +++ b/pages/comment/comment.js @@ -1,9 +1,31 @@ - +// comment.js Page({ + /** + * 页面的初始数据 + */ onLoad: function () { this.setData({ //icon20: base64.icon20, //icon60: base64.icon60 }); - } + }, + data: { + comment: [{ + img: '../../images/comment_img1.jpg', + userImg: '../../images/userimg1.png', + userName: '一叶知秋', + date: '2018-04-01', + desc: '由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。吧啦吧啦吧啦吧啦……', + likeCount: '10', + unlikeCount: '99' + }, { + img: '../../images/comment_img2.jpg', + userImg: '../../images/userimg2.png', + userName: '就是不说名字的人', + date: '2018-02-11', + desc: '由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。吧啦吧啦吧啦吧啦……', + likeCount: '100', + unlikeCount: '50' + }] + }, }); \ No newline at end of file diff --git a/pages/comment/comment.wxml b/pages/comment/comment.wxml index 57c16a0..917c213 100644 --- a/pages/comment/comment.wxml +++ b/pages/comment/comment.wxml @@ -1,88 +1,48 @@ - - - - 深夜食堂 - 人世间,酸甜苦辣,若长良川。 + + - - - - 我也要评论 - - + + + 深夜食堂 + 人世间,酸甜苦辣,若长良川。 + + + + 全部评论(3) + + +