Skip to content

Commit 6b5032a

Browse files
author
uniquexiaobai
committed
add signin ui
1 parent 631f876 commit 6b5032a

File tree

11 files changed

+52
-32
lines changed

11 files changed

+52
-32
lines changed

app.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"pages":[
33
"pages/index/index",
4-
"pages/logs/logs"
4+
"pages/explore/explore",
5+
"pages/famous/famous",
6+
"pages/me/me",
7+
"pages/logs/logs",
8+
"pages/signin/signin"
59
],
610
"window":{
711
"backgroundTextStyle":"light",
@@ -27,13 +31,13 @@
2731
"selectedIconPath": "img/tab/explore1.png"
2832
},
2933
{
30-
"pagePath": "pages/index/index",
34+
"pagePath": "pages/famous/famous",
3135
"text": "Famous",
3236
"iconPath": "img/tab/famous.png",
3337
"selectedIconPath": "img/tab/famous1.png"
3438
},
3539
{
36-
"pagePath": "pages/index/index",
40+
"pagePath": "pages/me/me",
3741
"text": "Me",
3842
"iconPath": "img/tab/me.png",
3943
"selectedIconPath": "img/tab/me1.png"

app.wxss

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
/**app.wxss**/
21
.container {
3-
height: 100%;
42
display: flex;
5-
flex-direction: column;
6-
align-items: center;
7-
justify-content: space-between;
3+
height: 100%;
84
padding: 200rpx 0;
95
box-sizing: border-box;
10-
}
6+
}
7+
.center {
8+
align-items: center;
9+
justify-content: center;
10+
}
11+
.row {
12+
flex-direction: row;
13+
}
14+
.col {
15+
flex-direction: column;
16+
}

pages/explore/explore.wxml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<view class="container">
2-
<view class="usermotto">
3-
<text>Explore</text>
4-
</view>
1+
<view class="container center">
2+
<text>Explore</text>
53
</view>

pages/famous/famous.wxml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<view class="container">
2-
<view class="usermotto">
3-
<text>Famous</text>
4-
</view>
1+
<view class="container center">
2+
<text>Famous</text>
53
</view>

pages/index/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ Page({
1212
url: '../logs/logs'
1313
})
1414
},
15+
goRouteSignIn: function() {
16+
wx.navigateTo({
17+
url: '../signin/signin'
18+
});
19+
},
1520
onLoad: function () {
16-
console.log('onLoad')
1721
var that = this
1822
//调用应用实例的方法获取全局数据
1923
app.getUserInfo(function(userInfo){
@@ -23,4 +27,4 @@ Page({
2327
})
2428
})
2529
}
26-
})
30+
});

pages/index/index.wxml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!--index.wxml-->
2-
<view class="container">
3-
<view bindtap="bindViewTap" class="userinfo">
1+
<view class="container col">
2+
<view bindtap="bindViewTap" class="userinfo">
43
<image class="userinfo-avatar" src="{{userInfo.avatarUrl}}" background-size="cover"></image>
54
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
5+
<text>{{motto}}</text>
66
</view>
7-
<view class="usermotto">
8-
<text class="user-motto">{{motto}}</text>
7+
<view class="routes">
8+
<button bindtap="goRouteSignIn" type="primary" size="mini">SignIn</button>
99
</view>
1010
</view>

pages/index/index.wxss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/**index.wxss**/
21
.userinfo {
32
display: flex;
43
flex-direction: column;
@@ -16,6 +15,6 @@
1615
color: #aaa;
1716
}
1817

19-
.usermotto {
20-
margin-top: 200px;
21-
}
18+
.routes {
19+
display: flex;
20+
}

pages/me/me.wxml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<view class="container">
2-
<view class="usermotto">
3-
<text>Me</text>
4-
</view>
1+
<view class="container center">
2+
<text>Me</text>
53
</view>

pages/signin/signin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Page({
3+
4+
});

pages/signin/signin.json

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

0 commit comments

Comments
 (0)