From 2cd868734452f96b8a9491cf424fc6c51f276fc3 Mon Sep 17 00:00:00 2001 From: ddl Date: Sun, 19 Feb 2017 21:46:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5ui=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 81 ++++++++++++++++++++++++++++++++++++++++- pages/index/index.wxml | 83 ++++++++++++++++++++++++++++++++++++++---- pages/index/index.wxss | 19 +--------- 3 files changed, 156 insertions(+), 27 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 96ace06..7fdc8b3 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -9,7 +9,7 @@ Page({ sliderLeft: 0, //首页博文列表 - sitehome: [ + blog_articles: [ { "Id": 1, "Title": "php连接mysql数据库", @@ -50,7 +50,7 @@ Page({ } ], //精华区博文列表 - picked: [ + blog_pickeds: [ { "Id": 1, "Title": "游戏UI框架设计(一) : 架构设计理论篇", @@ -89,6 +89,83 @@ Page({ "CommentCount": 10, "DiggCount": 11 } + ], + + //推荐新闻 + news_recommendeds: [ + { + "Id": 1, + "Title": "别转管理,十年程序员老鸟给新手的几条忠告", + "Summary": "英文原文:Mistakes I Made(as a developer)在 2006 年,我开始了编程工作。当意识到来到了十年这个重要的时间关口时,我觉得有必要回顾一下这十年间所犯下的错误,做一做经验", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + }, + { + "Id": 1, + "Title": "估值5亿的光圈直播倒闭,留下300万欠薪和失联的CEO", + "Summary": "去年战事激烈的直播行业,已经出现了首批阵亡名单。相比起两军对垒、战死沙场的轰轰烈烈,光圈的突然倒下多少显得莫名其妙。但至少,“死亡”结果已经可以确定。光圈直播的官网已", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + } + ], + //热门新闻 + news_hots: [ + { + "Id": 1, + "Title": "华为清理老员工:真的是兔死狗烹?", + "Summary": "最近两天,华为裁员的事情从华为自己的心声论坛发酵,进而出现在各个网站和媒体上,引发了各方关注。具体的内容是华为职工反映,中国区开始集中清理 34 岁以上的的交付工程", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + }, + { + "Id": 1, + "Title": "罕见!刘强东微博评价快递停摆 观点老辣", + "Summary": "京东 CEO 刘强东虽然开通了微博,但发微博的次数却非常少。不过今天下午,刘强东居然罕见的发布了一条微博,评价了最近某快递停摆事件。刘强东表示,快递停摆其实是电商十几年高增长隐", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + } + ], + //本周新闻 + + news_hots_week: [ + { + "Id": 1, + "Title": "比尔·盖茨开通微信公众号,发布30秒视频用中文问好", + "Summary": "文/俞斯译“你好,欢迎来我的微信公众号。”2 月 11 日,一个名为“比尔盖茨”(gatenotes)的微信公众号发布了一段 30 秒视频,比尔·盖", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + }, + { + "Id": 1, + "Title": "35岁、40岁、50岁都能当程序员", + "Summary": "华为要清理(也就是裁掉)34 岁以上的 “高龄” 员工的消息引发了广泛的争议,争议声中有一部分人支持华为的做法,认为 35 岁或 45 岁还写什么程序,认为程序员就是吃青春饭的。然而并不", + "TopicId": 4, + "TopicIcon": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "ViewCount": 6, + "CommentCount": 7, + "DiggCount": 8, + "DateAdded": "2017-02-19" + } ] }, onLoad: function () { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 772d5d9..af124eb 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -17,7 +17,7 @@ - + @@ -36,7 +36,6 @@ - @@ -45,7 +44,7 @@ - + @@ -64,18 +63,88 @@ - - + - + - + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index ce30de0..60af985 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,21 +1,4 @@ /**index.wxss**/ -.userinfo { - display: flex; - flex-direction: column; - align-items: center; -} - -.userinfo-avatar { - width: 128rpx; - height: 128rpx; - margin: 20rpx; +.weui-tab__panel image{ border-radius: 50%; } - -.userinfo-nickname { - color: #aaa; -} - -.usermotto { - margin-top: 200px; -} \ No newline at end of file -- Gitee From ad83733f91815d55ef75c886507306c5d841339d Mon Sep 17 00:00:00 2001 From: ddl Date: Sun, 19 Feb 2017 21:47:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=BC=BA=E5=B0=91=E7=9A=84pages=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/app.json b/app.json index f462356..220eac7 100644 --- a/app.json +++ b/app.json @@ -1,4 +1,5 @@ { + "pages": [ "pages/index/index", "pages/question/index", "pages/user/login", -- Gitee