From 82644698a6f35f7a97326c880db153dffff86195 Mon Sep 17 00:00:00 2001 From: tianqing Date: Sun, 19 Feb 2017 19:11:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=9A=E9=97=AE=E6=A8=A1=E5=9D=97=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=97=AE=E9=A2=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 ++-- pages/question/index.js | 58 +++++++++++++++++++++++++++++++++++++++ pages/question/index.json | 8 ++++++ pages/question/index.wxml | 40 +++++++++++++++++++++++++++ pages/question/index.wxss | 8 ++++++ 5 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 pages/question/index.js create mode 100644 pages/question/index.json create mode 100644 pages/question/index.wxml create mode 100644 pages/question/index.wxss diff --git a/app.json b/app.json index 20ff183..cf92f34 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,9 @@ { "pages":[ "pages/index/index", + "pages/question/index", "pages/user/login", + "pages/user/index", "pages/logs/logs" ], "window":{ @@ -16,7 +18,7 @@ "text": "首页" }, { - "pagePath": "pages/index/index", + "pagePath": "pages/question/index", "text": "博问" }, { @@ -28,7 +30,7 @@ "text": "知识库" }, { - "pagePath": "pages/index/index", + "pagePath": "pages/user/index", "text": "我的" } ] diff --git a/pages/question/index.js b/pages/question/index.js new file mode 100644 index 0000000..826d295 --- /dev/null +++ b/pages/question/index.js @@ -0,0 +1,58 @@ +// pages/question/index.js +Page({ + data:{ + tabs: ["问题列表", "我的关注", "我的博问", "博问标签"], + activeIndex: 0, + sliderOffset: 0, + sliderLeft: 0, + questions:[ + { + "Id": 1, + "Title": "0基础学习 PHP 求推荐课程 初中高 完整学习线路", + "Url": "http", + "Description": "1,51CTO 上付费的PHP 线路 是否有价值,上面说付费可以联系讲师答疑 不知真假 2,网盘里面的免费资源非常多,但是好的资源需要花好多时间去筛选。 第一个问题 : 想全面掌握PHP 采用哪一种方式好呢? 第二个问题: 有收徒的大神没?小弟在职学PHP 目前没有编程基础,但是可以付费学习", + "Author": "不知道", + "BlogApp": "sample string 6", + "Avatar": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "PostDate": "2017-02-19", + "ViewCount": 9, + "AnswerCount": 10, + "DiggCount": 11 + }, + { + "Id": 1, + "Title": "sample string 2", + "Url": "sample string 3", + "Description": "sample string 4", + "Author": "sample string 5", + "BlogApp": "sample string 6", + "Avatar": "http://img1.3lian.com/2015/w7/85/d/101.jpg", + "PostDate": "2017-02-19", + "ViewCount": 9, + "AnswerCount": 10, + "DiggCount": 11 + } +], + }, + onLoad:function(options){ + // 页面初始化 options为页面跳转所带来的参数 + }, + tabClick: function (e) { + this.setData({ + sliderOffset: e.currentTarget.offsetLeft, + activeIndex: e.currentTarget.id + }); + }, + onReady:function(){ + // 页面渲染完成 + }, + onShow:function(){ + // 页面显示 + }, + onHide:function(){ + // 页面隐藏 + }, + onUnload:function(){ + // 页面关闭 + } +}) \ No newline at end of file diff --git a/pages/question/index.json b/pages/question/index.json new file mode 100644 index 0000000..0130a4a --- /dev/null +++ b/pages/question/index.json @@ -0,0 +1,8 @@ +{ + "window":{ + "backgroundTextStyle":"light", + "navigationBarBackgroundColor": "#2b6695", + "navigationBarTitleText": "博问", + "navigationBarTextStyle":"#fff" + } +} \ No newline at end of file diff --git a/pages/question/index.wxml b/pages/question/index.wxml new file mode 100644 index 0000000..fc59d54 --- /dev/null +++ b/pages/question/index.wxml @@ -0,0 +1,40 @@ + + + + + + + + {{item}} + + + + + + + + + + + + + diff --git a/pages/question/index.wxss b/pages/question/index.wxss new file mode 100644 index 0000000..51b3263 --- /dev/null +++ b/pages/question/index.wxss @@ -0,0 +1,8 @@ +/* pages/question/index.wxss */ + +.userinfo-avatar { + width: 128rpx; + height: 128rpx; + margin: -2rpx; + border-radius: 50%; +} \ No newline at end of file -- Gitee