diff --git a/app.json b/app.json index 20ff183086e6ebc2c6447e7dc20ad014425c036a..cf92f34455d9b40a3f44d64f660b2682fb02024a 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 0000000000000000000000000000000000000000..826d295eb1cc31a34c66cbc1d6912189a71c7677 --- /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 0000000000000000000000000000000000000000..0130a4a04718b9318bf6424acba5468fa3f71e90 --- /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 0000000000000000000000000000000000000000..fc59d54f126787a07ff812f6700ecf98327c1d4e --- /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 0000000000000000000000000000000000000000..51b3263f09d2f9c14361a6d440856148107508c6 --- /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