Skip to content

Commit 3cf023e

Browse files
author
肖乐
committed
完成首页逻辑及UI
1 parent 46077cb commit 3cf023e

26 files changed

Lines changed: 419 additions & 25 deletions

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"license": "MIT",
1818
"dependencies": {
1919
"@wepy/core": "^2.0.0-alpha.9",
20-
"miniprogram-slide-view": "0.0.3"
20+
"miniprogram-slide-view": "0.0.3",
21+
"wepy-async-function": "^1.4.7"
2122
},
2223
"devDependencies": {
2324
"@wepy/cli": "^2.0.0-alpha.20",

project.config.json

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,49 @@
77
"minified": false
88
},
99
"compileType": "miniprogram",
10-
"appid": "wx1cd266053e0941ea",
10+
"appid": "wxe14508f78c680461",
1111
"projectname": "douban-mini-program",
1212
"miniprogramRoot": "weapp/",
1313
"simulatorType": "wechat",
1414
"simulatorPluginLibVersion": {},
15-
"condition": {}
15+
"condition": {
16+
"search": {
17+
"current": -1,
18+
"list": []
19+
},
20+
"conversation": {
21+
"current": -1,
22+
"list": []
23+
},
24+
"plugin": {
25+
"current": -1,
26+
"list": []
27+
},
28+
"game": {
29+
"list": []
30+
},
31+
"gamePlugin": {
32+
"current": -1,
33+
"list": []
34+
},
35+
"miniprogram": {
36+
"current": -1,
37+
"list": [
38+
{
39+
"id": -1,
40+
"name": "登录页",
41+
"pathName": "pages/index",
42+
"query": "",
43+
"scene": null
44+
},
45+
{
46+
"id": 1,
47+
"name": "首页",
48+
"pathName": "pages/home/home",
49+
"query": "",
50+
"scene": null
51+
}
52+
]
53+
}
54+
}
1655
}

src/app.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"pages": ["pages/index"],
3+
"permission": {
4+
"scope.userLocation": {
5+
"desc": "你的位置信息将用于小程序位置接口获取城市参数"
6+
}
7+
},
8+
"subpackages": [
9+
{
10+
"root": "pages/home",
11+
"name": "首页",
12+
"pages": [
13+
"home"
14+
]
15+
}
16+
],
17+
"window": {
18+
"navigationStyle": "default",
19+
"backgroundTextStyle": "light",
20+
"navigationBarBackgroundColor": "#ffffff",
21+
"navigationBarTitleText": "weChat",
22+
"navigationBarTextStyle": "black"
23+
}
24+
}

src/app.wpy

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<style lang="less">
2-
.container {
3-
height: 100%;
4-
display: flex;
5-
flex-direction: column;
6-
align-items: center;
7-
justify-content: space-between;
8-
box-sizing: border-box;
9-
}
2+
103
</style>
114

125
<script>
@@ -52,16 +45,4 @@ wepy.app({
5245
}
5346
});
5447
</script>
55-
<config>
56-
{
57-
pages: [
58-
'pages/index'
59-
],
60-
window: {
61-
backgroundTextStyle: 'light',
62-
navigationBarBackgroundColor: '#fff',
63-
navigationBarTitleText: 'WeChat',
64-
navigationBarTextStyle: 'black'
65-
}
66-
}
67-
</config>
48+
<config src="./app.json"></config>

src/assets/css/home.less

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
.home-container {
2+
.header-wrapper {
3+
background-color: #42BD55;
4+
height: 100rpx;
5+
display: flex;
6+
align-items: center;
7+
padding: 0 20rpx;
8+
.search-wrapper {
9+
background-color: white;
10+
width: 100%;
11+
height: 50rpx;
12+
display: flex;
13+
justify-content: center;
14+
align-items: center;
15+
border-radius: 10rpx;
16+
font-size: 24rpx;
17+
font-weight: 400;
18+
color: #C6C6C6;
19+
image {
20+
width: 32rpx;
21+
height: 32rpx;
22+
margin-right: 10rpx;
23+
}
24+
}
25+
}
26+
.group {
27+
height: 386rpx;
28+
margin-bottom: 10rpx;
29+
.group-header {
30+
padding: 0 35rpx;
31+
height: 90rpx;
32+
display: flex;
33+
align-items: center;
34+
justify-content: space-between;
35+
font-size: 28rpx;
36+
margin-bottom: 4rpx;
37+
.title {
38+
font-weight: bold;
39+
}
40+
.more {
41+
color: #42BD55;
42+
display: flex;
43+
align-items: center;
44+
.arrow {
45+
border: 2rpx solid #42BD55;
46+
border-left: none;
47+
border-bottom: none;
48+
width: 10rpx;
49+
height: 10rpx;
50+
transform: rotate(45deg);
51+
margin-left: 5rpx;
52+
}
53+
}
54+
}
55+
.collectionView {
56+
// display: flex;
57+
// flex-direction: row;
58+
// justify-content: flex-start;
59+
// overflow-x: auto;
60+
white-space: nowrap;
61+
.cell {
62+
margin-left: 30rpx;
63+
display: inline-block;
64+
width: 160rpx;
65+
.item-icon {
66+
width: 100%;
67+
height: 210rpx;
68+
border-radius: 6rpx;
69+
}
70+
.item-title {
71+
font-size: 24rpx;
72+
font-weight: bold;
73+
margin-top: 4rpx;
74+
overflow: hidden;
75+
white-space: nowrap;
76+
text-overflow: ellipsis;
77+
}
78+
.item-scoreWrapper {
79+
display: flex;
80+
justify-content: flex-start;
81+
align-items: center;
82+
color: #A6A6A6;
83+
font-size: 20rpx;
84+
image {
85+
width: 20rpx;
86+
height: 20rpx;
87+
}
88+
.item-score {
89+
margin-left: 4rpx;
90+
}
91+
}
92+
.item-noScore {
93+
font-size: 20rpx;
94+
color: #A6A6A6;
95+
}
96+
&.cell:last-of-type {
97+
margin-right: 30rpx;
98+
}
99+
}
100+
}
101+
}
102+
}

src/assets/imgs/bg_mine_login.png

303 KB
Loading

src/assets/imgs/ic_cat_book.png

1.02 KB
Loading

src/assets/imgs/ic_cat_movie.png

2.32 KB
Loading

src/assets/imgs/ic_cat_music.png

2.11 KB
Loading

0 commit comments

Comments
 (0)