Merge pull request 'xbx' (#5) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/5
This commit is contained in:
commit
7eda034834
@ -2,7 +2,7 @@
|
||||
## 使用
|
||||
- scss
|
||||
- uniapp
|
||||
- 组建库待定
|
||||
- 组建库 [uview](http://www.uviewui.com/)
|
||||
## 目录结构
|
||||
```1=
|
||||
|-pages tabes 目录
|
||||
|
25
components/index/ad/index.vue
Normal file
25
components/index/ad/index.vue
Normal 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>
|
54
components/index/daren-item/index.vue
Normal file
54
components/index/daren-item/index.vue
Normal 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>
|
@ -4,10 +4,11 @@
|
||||
|
||||
</image>
|
||||
<view class="title">这是标题这是标题这是标题</view>
|
||||
<view class="jianjie">这是简介这是简介这是简介</view>
|
||||
<view class="user">
|
||||
<view>
|
||||
<image></image>
|
||||
<text></text>
|
||||
<text>这是名字</text>
|
||||
</view>
|
||||
<image></image>
|
||||
</view>
|
||||
@ -15,21 +16,36 @@
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.video-item{
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
margin-top: 20rpx;
|
||||
width: 335rpx;
|
||||
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||
padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
.head{
|
||||
width: 100%;
|
||||
height: 334rpx;
|
||||
border-radius: 20rpx 0;
|
||||
}
|
||||
.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;
|
||||
color: #666;
|
||||
line-height: 30rpx;
|
||||
margin-top: 20px;
|
||||
width: 307rpx;
|
||||
margin-left: 18rpx;
|
||||
overflow:hidden;
|
||||
@ -37,18 +53,28 @@
|
||||
display:-webkit-box;
|
||||
-webkit-box-orient:vertical;
|
||||
-webkit-line-clamp:2;
|
||||
|
||||
}
|
||||
.user{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin:0 auto;
|
||||
margin-top: 20rpx;
|
||||
width: 307rpx;
|
||||
>view{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>image{
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
>text{
|
||||
font-size: 20rpx;
|
||||
color:#333;
|
||||
margin-left: 9rpx;
|
||||
}
|
||||
}
|
||||
>image{
|
||||
|
75
components/index/zhibo-item/index.vue
Normal file
75
components/index/zhibo-item/index.vue
Normal 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>
|
@ -12,26 +12,56 @@
|
||||
<swiper class="card">
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<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>
|
||||
<videoItem></videoItem>
|
||||
<view class="box">
|
||||
<indexad style="width:690rpx"></indexad>
|
||||
<view class="list">
|
||||
<view >
|
||||
<videoItem v-for="item in 10"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<videoItem v-for="item in 10"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view id="demo1" class="scroll-view-item uni-bg-red">A</view>
|
||||
<view id="demo2" class="scroll-view-item uni-bg-green">B</view>
|
||||
<view id="demo3" class="scroll-view-item uni-bg-blue">C</view>
|
||||
<view class="box">
|
||||
<indexad style="width:690rpx"></indexad>
|
||||
<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>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view id="demo1" class="scroll-view-item uni-bg-red">A</view>
|
||||
<view id="demo2" class="scroll-view-item uni-bg-green">B</view>
|
||||
<view id="demo3" class="scroll-view-item uni-bg-blue">C</view>
|
||||
<view class="box">
|
||||
<view class="tuijian">
|
||||
<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>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -41,11 +71,11 @@
|
||||
<style lang="scss" scoped>
|
||||
.index{
|
||||
width: 750rpx;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
.top{
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
@ -55,7 +85,6 @@
|
||||
.sosuo{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
background-color: #0f0;
|
||||
}
|
||||
.tabs{
|
||||
display: flex;
|
||||
@ -83,19 +112,62 @@
|
||||
}
|
||||
}
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.ad{
|
||||
width: 100%;
|
||||
.box{
|
||||
width: 100%;
|
||||
height: 294rpx;
|
||||
border-radius: 20rpx;
|
||||
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>
|
||||
<script>
|
||||
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 {
|
||||
name:"index",
|
||||
data(){
|
||||
@ -104,7 +176,10 @@ export default {
|
||||
}
|
||||
},
|
||||
components:{
|
||||
videoItem
|
||||
videoItem,
|
||||
zhiboItem,
|
||||
indexad,
|
||||
darenItem
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user