Skip to content

Commit

Permalink
add users
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyCodes committed Sep 28, 2016
1 parent 8319a77 commit 579aef4
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 19 deletions.
Binary file added .DS_Store
Binary file not shown.
10 changes: 0 additions & 10 deletions app.json
Expand Up @@ -24,16 +24,6 @@
"text": "资讯",
"iconPath":"images/zixun@2x.png",
"selectedIconPath":"images/zixun_selected@2x.png"
}, {
"pagePath": "pages/found/index/index",
"text": "发现",
"iconPath":"images/faxian@2x.png",
"selectedIconPath":"images/faxian_selected@2x.png"
},{
"pagePath":"",
"text":"关注",
"iconPath":"images/xiaoxi@2x.png",
"selectedIconPath":"images/xiaoxi_selected@2x.png"
},{
"pagePath":"pages/personal/index/index",
"text":"",
Expand Down
18 changes: 18 additions & 0 deletions app.wxss
Expand Up @@ -19,4 +19,22 @@
}
.height_auto{
height:100%;
}
.flex-wrp{
height: 60px;
display:flex;
background-color: #FFFFFF;
}
.flex-item{
width: 33.33%;
height: 60px;
color: #000;
padding-top:8px;
text-align: center;
justify-content: center;
align-items: center;
}
.two_side{
border-left:0.5px solid #ebebeb;
border-right:0.5px solid #ebebeb;
}
Binary file added images/collection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions images/collection.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/eve.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/rightjian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/set.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 17 additions & 7 deletions pages/personal/index/index.js
Expand Up @@ -5,17 +5,27 @@ var index_obj = require(root_path+'function/personal_index.js')

Page({
data:{
userInfo: {}
// text:"这是一个页面"
userInfo: {},
y_menus:[
{title:'消息通知'},
{title:'浏览历史'},
{title:'吐槽一下'},
],
x_menus:[
{title:'收藏',icon:'/images/collection.png'},
{title:'夜间',icon:'/images/eve.png',classes:'two_side'},
{title:'设置',icon:'/images/set.png'},
],
},
onLoad:function(options){
var that = this;
app.getUserInfo(function(userInfo){
console.log(userInfo);
//更新数据
that.setData({
userInfo:userInfo
})
console.log(userInfo);

//设置用户信息
that.setData({
userInfo:userInfo
})
});
},
onReady:function(){
Expand Down
18 changes: 18 additions & 0 deletions pages/personal/index/index.wxml
Expand Up @@ -4,4 +4,22 @@
<view class="nickname">{{userInfo.nickName}}</view>
<view class="orther">{{userInfo.province}}</view>
</view>
</view>
<view id="section">
<view class="flex-wrp" style="flex-direction:row;">
<view class="flex-item {{item.classes}}" wx:for="{{x_menus}}">
<view>
<image src="{{item.icon}}" class="icon"></image>
</view>
<view class="menus_title">
<text>{{item.title}}</text>
</view>
</view>
</view>
</view>
<view id="menus">
<view class="content" wx:for="{{y_menus}}">
<view class="view"><text>{{item.title}}</text></view>
<view class="right"><image src="/images/rightjian.png" style="width:14px;height:14px"></image></view>
</view>
</view>
42 changes: 40 additions & 2 deletions pages/personal/index/index.wxss
@@ -1,11 +1,14 @@
page{
background: #ebebeb;
}
#header{
width:100%;
height:280px;
height:260px;
background: #3080c0;
color:#ffffff;
}
#header .content{
padding-top:90px;
padding-top:60px;
text-align: center;
}
#header .content image{
Expand All @@ -19,4 +22,39 @@
#header .content .orther{
padding-top:10px;
font-size:15px;
}
#section .icon{
width:23px;
height:23px;
}
#section .menus_title{
display: block;
}
#section .menus_title text{
font-size:13px;
}
#menus{
background: #ffffff;
margin-top:10px;
height:auto;
width:100%;
}
#menus .content{
height:45px;
border-bottom: 0.5px solid #ebebeb;
}
#menus .content .view{
float: left;

}
#menus .content .view text{
font-size:15px;
line-height:45px;
padding-left:20px;
}
#menus .content .right{
height: 45px;
float: right;
margin-right:10px;
line-height: 45px;
}

0 comments on commit 579aef4

Please sign in to comment.