Skip to content

Commit

Permalink
完成首页逻辑及UI
Browse files Browse the repository at this point in the history
  • Loading branch information
肖乐 committed Mar 19, 2020
1 parent 46077cb commit 3cf023e
Show file tree
Hide file tree
Showing 26 changed files with 419 additions and 25 deletions.
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"license": "MIT",
"dependencies": {
"@wepy/core": "^2.0.0-alpha.9",
"miniprogram-slide-view": "0.0.3"
"miniprogram-slide-view": "0.0.3",
"wepy-async-function": "^1.4.7"
},
"devDependencies": {
"@wepy/cli": "^2.0.0-alpha.20",
Expand Down
43 changes: 41 additions & 2 deletions project.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,49 @@
"minified": false
},
"compileType": "miniprogram",
"appid": "wx1cd266053e0941ea",
"appid": "wxe14508f78c680461",
"projectname": "douban-mini-program",
"miniprogramRoot": "weapp/",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {}
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "登录页",
"pathName": "pages/index",
"query": "",
"scene": null
},
{
"id": 1,
"name": "首页",
"pathName": "pages/home/home",
"query": "",
"scene": null
}
]
}
}
}
24 changes: 24 additions & 0 deletions src/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"pages": ["pages/index"],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口获取城市参数"
}
},
"subpackages": [
{
"root": "pages/home",
"name": "首页",
"pages": [
"home"
]
}
],
"window": {
"navigationStyle": "default",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTitleText": "weChat",
"navigationBarTextStyle": "black"
}
}
23 changes: 2 additions & 21 deletions src/app.wpy
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<style lang="less">
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}

</style>

<script>
Expand Down Expand Up @@ -52,16 +45,4 @@ wepy.app({
}
});
</script>
<config>
{
pages: [
'pages/index'
],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black'
}
}
</config>
<config src="./app.json"></config>
102 changes: 102 additions & 0 deletions src/assets/css/home.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.home-container {
.header-wrapper {
background-color: #42BD55;
height: 100rpx;
display: flex;
align-items: center;
padding: 0 20rpx;
.search-wrapper {
background-color: white;
width: 100%;
height: 50rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10rpx;
font-size: 24rpx;
font-weight: 400;
color: #C6C6C6;
image {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
}
}
.group {
height: 386rpx;
margin-bottom: 10rpx;
.group-header {
padding: 0 35rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
margin-bottom: 4rpx;
.title {
font-weight: bold;
}
.more {
color: #42BD55;
display: flex;
align-items: center;
.arrow {
border: 2rpx solid #42BD55;
border-left: none;
border-bottom: none;
width: 10rpx;
height: 10rpx;
transform: rotate(45deg);
margin-left: 5rpx;
}
}
}
.collectionView {
// display: flex;
// flex-direction: row;
// justify-content: flex-start;
// overflow-x: auto;
white-space: nowrap;
.cell {
margin-left: 30rpx;
display: inline-block;
width: 160rpx;
.item-icon {
width: 100%;
height: 210rpx;
border-radius: 6rpx;
}
.item-title {
font-size: 24rpx;
font-weight: bold;
margin-top: 4rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-scoreWrapper {
display: flex;
justify-content: flex-start;
align-items: center;
color: #A6A6A6;
font-size: 20rpx;
image {
width: 20rpx;
height: 20rpx;
}
.item-score {
margin-left: 4rpx;
}
}
.item-noScore {
font-size: 20rpx;
color: #A6A6A6;
}
&.cell:last-of-type {
margin-right: 30rpx;
}
}
}
}
}
Binary file added src/assets/imgs/bg_mine_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_cat_book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_cat_movie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_cat_music.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_home_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_home_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_profile_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_profile_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_subject_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ic_tab_subject_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/nav_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/nav_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/rating_star_small_half.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/rating_star_small_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/rating_star_small_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/upsdk_cancel_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3cf023e

Please sign in to comment.