Skip to content

Commit 3602096

Browse files
author
uniquexiaobai
committed
add Page Me list
1 parent 6b5032a commit 3602096

File tree

8 files changed

+64
-7
lines changed

8 files changed

+64
-7
lines changed

app.wxss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
.container {
22
display: flex;
33
height: 100%;
4-
padding: 200rpx 0;
54
box-sizing: border-box;
65
}
7-
.center {
8-
align-items: center;
9-
justify-content: center;
6+
.flex {
7+
display: flex;
108
}
119
.row {
1210
flex-direction: row;
1311
}
1412
.col {
1513
flex-direction: column;
1614
}
15+
.align_center {
16+
align-items: center;
17+
}
18+
.justify_center {
19+
justify-content: center;
20+
}
21+
.center {
22+
align-items: center;
23+
justify-content: center;
24+
}

img/me/angle-right.png

478 Bytes
Loading

img/me/cog.png

1.34 KB
Loading

img/me/edit.png

1.13 KB
Loading

pages/me/me.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11

22
var app = getApp()
33
Page({
4-
4+
data: {
5+
login: 'uniquexiaobai',
6+
avatar_url: "https://avatars.githubusercontent.com/u/12796673?v=3"
7+
}
58
});

pages/me/me.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"navigationBarTitleText": "Me"
3+
}

pages/me/me.wxml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
<view class="container center">
2-
<text>Me</text>
1+
<view class="container col me">
2+
<view class="item">
3+
<image src="{{avatar_url}}" class="avatar"></image>
4+
<text class="flex1">{{login}}</text>
5+
<image src="/img/me/angle-right.png" class="icon-right"></image>
6+
</view>
7+
<view class="item">
8+
<image src="/img/me/edit.png" class="icon"></image>
9+
<text class="flex1">Edit Profile</text>
10+
<image src="/img/me/angle-right.png" class="icon-right"></image>
11+
</view>
12+
<view class="item">
13+
<image src="/img/me/cog.png" class="icon"></image>
14+
<text class="flex1">Settings</text>
15+
<image src="/img/me/angle-right.png" class="icon-right"></image>
16+
</view>
317
</view>

pages/me/me.wxss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.me {
2+
background: #F0EFF5;
3+
}
4+
.item {
5+
display: flex;
6+
align-items: center;
7+
justify-content: space-between;
8+
padding: 5px;
9+
margin-top: 20px;
10+
background: #fff;
11+
}
12+
.avatar {
13+
width: 40px;
14+
height: 40px;
15+
border: 1px solid #9A9A9A;
16+
margin-right: 10px;
17+
}
18+
.icon {
19+
width: 15px;
20+
height: 15px;
21+
margin-right: 20px;
22+
}
23+
.icon-right {
24+
width: 20px;
25+
height: 20px;
26+
}
27+
.flex1 {
28+
flex: 1;
29+
}

0 commit comments

Comments
 (0)