xbx #5

Merged
theluyuan merged 4 commits from xbx into master 2020-06-02 03:15:37 +00:00
6 changed files with 282 additions and 27 deletions

View File

@ -2,7 +2,7 @@
## 使用 ## 使用
- scss - scss
- uniapp - uniapp
- 组建库待定 - 组建库 [uview](http://www.uviewui.com/)
## 目录结构 ## 目录结构
```1= ```1=
|-pages tabes 目录 |-pages tabes 目录

View File

@ -0,0 +1,25 @@
<template>
<swiper class="ad" indicator-dots="true" indicator-color="#fff" indicator-active-color="#634838">
<swiper-item></swiper-item>
<swiper-item></swiper-item>
<swiper-item></swiper-item>
</swiper>
</template>
<style lang="scss" scoped>
.ad{
width: 100%;
height: 294rpx;
border-radius: 20rpx;
background-color: #0f0;
}
</style>
<script>
export default {
name:"ad",
data(){
return {
}
}
}
</script>

View File

@ -0,0 +1,54 @@
<template>
<view class="daren-item">
<image class="head"></image>
<text class="name">这是名字</text>
<text class="zhuangtai">直播状态</text>
<view class="guanzhu">关注</view>
</view>
</template>
<script>
export default {
name:"daren-item"
}
</script>
<style lang="scss" scoped>
.daren-item{
width: 215rpx;
height: 282rpx;
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
border-radius: 10rpx;
overflow: hidden;
.head{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-top: 24rpx;
background-color: #0f0;
}
.name{
font-size: 26rpx;
color: #333;
font-weight: 400;
margin-top: 23rpx;
}
.zhuangtai{
font-size:22rpx;
color: #999;
margin-top: 19rpx;
}
.guanzhu{
width: 130rpx;
height: 50rpx;
background-color: #FF780F;
font-size: 26rpx;
line-height: 50rpx;
color: #fff;
text-align: center;
margin-top: 19rpx;
border-radius: 25rpx;
}
}
</style>

View File

@ -4,10 +4,11 @@
</image> </image>
<view class="title">这是标题这是标题这是标题</view> <view class="title">这是标题这是标题这是标题</view>
<view class="jianjie">这是简介这是简介这是简介</view>
<view class="user"> <view class="user">
<view> <view>
<image></image> <image></image>
<text></text> <text>这是名字</text>
</view> </view>
<image></image> <image></image>
</view> </view>
@ -15,21 +16,36 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.video-item{ .video-item{
image{
background-color: #0f0;
}
margin-top: 20rpx; margin-top: 20rpx;
width: 335rpx; width: 335rpx;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
.head{ .head{
width: 100%; width: 100%;
height: 334rpx; height: 334rpx;
border-radius: 20rpx 0;
} }
.title{ .title{
margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx;
color: #333;
font-weight: 500;
line-height: 30rpx;
width: 307rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
.jianjie{
margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #666; color: #666;
line-height: 30rpx; line-height: 30rpx;
margin-top: 20px;
width: 307rpx; width: 307rpx;
margin-left: 18rpx; margin-left: 18rpx;
overflow:hidden; overflow:hidden;
@ -37,18 +53,28 @@
display:-webkit-box; display:-webkit-box;
-webkit-box-orient:vertical; -webkit-box-orient:vertical;
-webkit-line-clamp:2; -webkit-line-clamp:2;
} }
.user{ .user{
display: flex;
justify-content: space-between;
align-items: center;
margin:0 auto;
margin-top: 20rpx;
width: 307rpx;
>view{ >view{
display: flex; display: flex;
align-items: center; align-items: center;
>image{ >image{
width: 38rpx; width: 38rpx;
height: 38rpx; height: 38rpx;
border-radius: 50%;
} }
>text{ >text{
font-size: 20rpx; font-size: 20rpx;
color:#333; color:#333;
margin-left: 9rpx;
} }
} }
>image{ >image{

View File

@ -0,0 +1,75 @@
<template>
<view class="zhibo">
<image class="head"></image>
<view class="user">
<view class="name">
<image></image>
<text>这是名字</text>
</view>
<view class="pingbi">
<image></image>
<text>屏蔽用户</text>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.zhibo{
width: 335rpx;
margin-top: 20rpx;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
.head{
width: 100%;
height: 425rpx;
}
.user{
display: flex;
justify-content: space-between;
align-items: center;
margin:0 auto;
margin-top: 20rpx;
width: 307rpx;
.name{
display: flex;
align-items: center;
>image{
width: 38rpx;
height: 38rpx;
border-radius: 50%;
}
>text{
font-size: 20rpx;
color:#333;
margin-left: 9rpx;
}
}
.pingbi{
display: flex;
align-items: center;
>text{
font-size: 20rpx;
color: #333;
margin-left: 9rpx;
}
>image{
width: 24rpx;
height: 24rpx;
}
}
}
}
</style>
<script>
export default {
name:"zhibo-item",
data(){
return {
}
}
}
</script>

View File

@ -12,26 +12,56 @@
<swiper class="card"> <swiper class="card">
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<swiper class="ad" indicator-dots="true" indicator-color="#fff" indicator-active-color="#634838"> <view class="box">
<swiper-item></swiper-item> <indexad style="width:690rpx"></indexad>
<swiper-item></swiper-item> <view class="list">
<swiper-item></swiper-item> <view >
</swiper> <videoItem v-for="item in 10"></videoItem>
<videoItem></videoItem> </view>
<view style="margin-left:20rpx">
<videoItem v-for="item in 10"></videoItem>
</view>
</view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<view id="demo1" class="scroll-view-item uni-bg-red">A</view> <view class="box">
<view id="demo2" class="scroll-view-item uni-bg-green">B</view> <indexad style="width:690rpx"></indexad>
<view id="demo3" class="scroll-view-item uni-bg-blue">C</view> <view class="list">
<view >
<zhiboItem v-for="item in 10"></zhiboItem>
</view>
<view style="margin-left:20rpx">
<zhiboItem v-for="item in 10"></zhiboItem>
</view>
</view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<view id="demo1" class="scroll-view-item uni-bg-red">A</view> <view class="box">
<view id="demo2" class="scroll-view-item uni-bg-green">B</view> <view class="tuijian">
<view id="demo3" class="scroll-view-item uni-bg-blue">C</view> <view class="title">
<view class="left">
<view></view>
<text>推荐达人</text>
</view>
<image class="right"></image>
</view>
<view class="tuijianlist">
<darenItem style="margin-right:23rpx"></darenItem>
<darenItem style="margin-right:23rpx"></darenItem>
<darenItem></darenItem>
</view>
</view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -41,11 +71,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.index{ .index{
width: 750rpx; width: 750rpx;
padding: 0 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
.top{ .top{
padding: 0 30rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
@ -55,7 +85,6 @@
.sosuo{ .sosuo{
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
background-color: #0f0;
} }
.tabs{ .tabs{
display: flex; display: flex;
@ -83,19 +112,62 @@
} }
} }
.card{ .card{
width: 100%;
height: 100%; height: 100%;
.ad{
width: 100%; width: 100%;
height: 294rpx; .box{
border-radius: 20rpx; width: 100%;
background-color: #0f0; padding: 0 30rpx;
}
.list{
display: flex;
}
}
.tuijian{
width: 750rpx;
margin-left: -30rpx;
height: 400rpx;
background-color: #ececec;
padding: 30rpx;
.title{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
align-items: center;
>view{
width: 6rpx;
height: 30rpx;
background-color: #FF780F;
}
>text{
font-size: 30rpx;
color: 30rpx;
margin-left: 14rpx;
}
}
.right{
width: 14rpx;
height: 24rpx;
}
}
.tuijianlist{
width: 100%;
height: 282rpx;
margin-top: 30rpx;
display: flex;
} }
} }
} }
</style> </style>
<script> <script>
import videoItem from "@/components/index/video-item/index" import videoItem from "@/components/index/video-item/index"
import zhiboItem from "@/components/index/zhibo-item/index"
import indexad from "@/components/index/ad/index"
import darenItem from "@/components/index/daren-item/index"
export default { export default {
name:"index", name:"index",
data(){ data(){
@ -104,7 +176,10 @@ export default {
} }
}, },
components:{ components:{
videoItem videoItem,
zhiboItem,
indexad,
darenItem
} }
} }
</script> </script>