Commit c6d91fbf authored by 俞嘉婷's avatar 俞嘉婷

feat: 首页布局

parent 1e172ea1
......@@ -4,7 +4,7 @@
min-height: 100vh;
background-image: linear-gradient(0deg, rgb(180, 206, 120) 0%, rgb(255, 255, 255) 100%);
box-sizing: border-box;
padding-top: 630rpx;
padding-top: 457rpx;
.top_swiper {
position: absolute;
......@@ -29,10 +29,123 @@
}
.user_info {
position: relative;
width: 750rpx;
height: 179rpx;
background: url("https://yun.duiba.com.cn/polaris/home_user_bg.ea4bcbe05ac4a4daf74370556ef3d305177af1ff.png") no-repeat center center / 100%;
.avatar_box {
position: absolute;
top: 40rpx;
left: 40rpx;
width: 108rpx;
height: 108rpx;
background: url("https://yun.duiba.com.cn/polaris/avator_bg.0a457012445a1bc3b3b4ff8eb3e994e4e14f811a.png") no-repeat center center / 100%;
.avatar {
width: 102rpx;
height: 102rpx;
border-radius: 50%;
position: absolute;
top: 2px;
left: 2px;
}
}
.nickname {
position: absolute;
top: 50rpx;
left: 175rpx;
width: 324rpx;
height: 28rpx;
line-height: 28rpx;
background: url("https://yun.duiba.com.cn/polaris/hi.acc0ddea7383d9705620e30ff83e9bae49ba95d0.png") no-repeat center left / 38rpx 28rpx;
box-sizing: border-box;
padding-left: 45rpx;
font-size: 30rpx;
color: #824e00;
text-shadow: 0px 1rpx 0px rgba(255, 222, 149, 0.96);
}
.tel {
position: absolute;
top: 100rpx;
left: 175rpx;
width: 266rpx;
height: 36rpx;
background: url("https://yun.duiba.com.cn/polaris/home_tel_bg.9f2062920f917bdbb508a13f83a41f389dff90b3.png") no-repeat center center / 100%;
box-sizing: border-box;
padding: 0 10rpx;
line-height: 36rpx;
font-size: 24rpx;
color: rgb(255, 255, 255);
text-align: left;
}
}
.content_info {
position: relative;
width: 721rpx;
min-height: 847rpx;
margin: 10rpx auto;
padding-top: 96rpx;
.content_info_bg {
position: absolute;
left: 0;
top: 0;
width: 721rpx;
height: 847rpx;
background: url("https://yun.duiba.com.cn/polaris/home_act_bg.cb6289ef02fd2785dfba263a4999a187e442b93b.png") no-repeat center center / 100%;
}
.content_sub {
position: absolute;
left: 544rpx;
top: 27rpx;
width: 152rpx;
height: 52rpx;
background: url("https://yun.duiba.com.cn/polaris/home_sub_bg.9e7bf12da496c6542a8c117afab63acd22ba776e.png") no-repeat center center / 100%;
font-size: 26rpx;
color: #7d4400;
line-height: 50rpx;
text-align: center;
}
.content_act_list {
position: relative;
background-color: rgb(255, 249, 231);
width: 721rpx;
min-height: 751rpx;
box-sizing: border-box;
padding: 32rpx 25rpx;
border-radius: 24rpx 24rpx 0 0;
.content_act_list_title {
font-size: 30rpx;
color: #7d4400;
}
.content_act_list_more {
font-size: 30rpx;
color: #7d4400;
position: absolute;
top: 32rpx;
right: 25rpx;
}
.act_list {
position: relative;
width: 100%;
margin-top: 18rpx;
.act_item {
width: 686rpx;
height: 420rpx;
margin-bottom: 20rpx;
}
}
}
}
}
......
......@@ -5,13 +5,24 @@
<image class="swiper_item_img" src="{{item}}" lazy-load />
</swiper-item>
</swiper>
<view class="user_info">
<image class="avatar" src="{{userInfo.avatarUrl}}"></image>
<view class="avatar_box">
<image class="avatar" src="{{userInfo.avatarUrl}}"></image>
</view>
<text class="nickname">我的用户名称</text>
<text class="tel">手机号:13409876765</text>
</view>
<view class="content_info">
<view class="content_info_bg"></view>
<view class="content_sub">订阅消息</view>
<view class="content_act_list">
<view class="content_act_list_title">热门活动</view>
<view class="content_act_list_more">查看更多 ></view>
<view class="act_list">
<image class="act_item" wx:for="{{homeInfo.actList}}" wx:key="{{index}}" src="{{item}}"></image>
</view>
</view>
</view>
<!-- <view class="userinfo">
<block wx:if="{{canIUseNicknameComp && !hasUserInfo}}">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
......@@ -35,7 +46,5 @@
<view class="usermotto">
<text class="user-motto">{{homeInfo.name}}</text>
</view> -->
<get-panel wx:if="{{true}}" bind:close="closeGetPanel" />
<get-panel wx:if="{{false}}" bind:close="closeGetPanel" />
</view>
\ No newline at end of file
......@@ -8,6 +8,14 @@ class Store {
age: 123123,
banner: [
"https://yun.duiba.com.cn/polaris/banner.bf4a3033e8bb2cb9eb20c534d002879a2f6b5579.png",
],
actList: [
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
"https://yun.duiba.com.cn/polaris/banner1.653abf8ac33740307cee1ddb6c69d3502b532f61.png",
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment