lybenson пре 8 година
родитељ
комит
a603a9260c
3 измењених фајлова са 232 додато и 61 уклоњено
  1. 4 53
      src/components/live/BLive.vue
  2. 125 4
      src/components/live/BLiveRank.vue
  3. 103 4
      src/components/live/BLiveRankItem.vue

+ 4 - 53
src/components/live/BLive.vue

@@ -35,29 +35,19 @@
 			</div>
 		</div>
 		<div class="b-r">
-			<div class="b-head">
-				<ul class="b-slt-tab" data-initialized="true">
-					<li>
-						<span class="b-tab-text">直播排行</span>
-					</li>
-					<li class="on">
-						<span class="b-tab-text">关注的主播</span>
-					</li>
-					<li>
-						<span class="b-tab-text">为你推荐</span>
-					</li>
-				</ul>
-			</div>
+			<BLiveRank></BLiveRank>
 		</div>
 	</div>
 </template>
 
 <script>
 import BLiveItem from 'components/live/BLiveItem'
+import BLiveRank from 'components/live/BLiveRank'
 import { mapGetters } from 'vuex'
 export default {
 	components: {
-		BLiveItem
+		BLiveItem,
+		BLiveRank
 	},
 	computed: {
 		...mapGetters([
@@ -212,45 +202,6 @@ export default {
 			min-height 360px
 			height 360px
 			overflow hidden
-			.b-head
-				position relative
-				.b-slt-tab
-					padding-left 0
-					position relative
-					display inline-block
-					vertical-align middle
-					li
-						float left
-						position relative
-						padding 1px 0 2px
-						border-bottom 1px solid transparent
-						height 20px
-						line-height 20px
-						cursor pointer
-						text-align center
-						margin-left 15px
-						&:first-child
-							margin 0
-						&.on
-							background-color transparent
-							border-color #00a1d6
-							color #00aid6
-							.b-tab-text
-								color #00a1d6
-							&:before
-								content ''
-								display block
-								position absolute
-								left 50%
-								margin-left -3px
-								bottom 0
-								width 0
-								height 0
-								border 3px dashed #00a1d6
-								border-bottom-style solid
-								border-top 0
-								border-left-color transparent
-								border-right-color transparent
 		&:after
 			content ''
 			display block

+ 125 - 4
src/components/live/BLiveRank.vue

@@ -1,15 +1,136 @@
 <template>
-	<div>
-		
+	<div class="rank">
+		<div class="b-head">
+			<ul class="b-slt-tab" data-initialized="true">
+				<li>
+					<span class="b-tab-text">直播排行</span>
+				</li>
+				<li class="on">
+					<span class="b-tab-text">关注的主播</span>
+				</li>
+				<li>
+					<span class="b-tab-text">为你推荐</span>
+				</li>
+			</ul>
+		</div>
+		<div class="b-body">
+			<div class="r-list-body">
+				<div class="r-list-wrapper">
+					<ul class="r-list-live">
+						<BLiveRankItem></BLiveRankItem>
+					</ul>
+					<ul class="r-list-live"></ul>
+					<ul class="r-list-live">
+						<div class="mini-preview-wrapper">
+							<div class="mini-preview-list-wrapper">
+								<ul class="mini-preview">
+									<li class="preview">
+										<a href="" target="_blank">
+											<img src="//i0.hdslb.com/bfs/live/1caac895c488aae25d4d187184d04d62f204fb78.jpg">
+										</a>
+									</li>
+									<li class="preview">
+										<a href="" target="_blank">
+											<img src="//i0.hdslb.com/bfs/live/863a784bded94e7435560b3f1505b5393c6ef40f.jpg">
+										</a>
+									</li>
+									<li class="preview">
+										<a href="" target="_blank">
+											<img src="//i0.hdslb.com/bfs/live/adaca7f86f590fbc79d5a09f31a4a05092c45bcf.jpg">
+										</a>
+									</li>
+								</ul>
+							</div>
+							<div class="s-bottom">
+								<div class="info">
+									
+								</div>
+								<ul class="slider-bar">
+									<li class="on"></li>
+									<li class="on"></li>
+									<li class="on"></li>
+								</ul>
+							</div>
+						</div>
+						<div class="live-pmt-live">
+							
+						</div>
+					</ul>
+				</div>
+			</div>
+		</div>
 	</div>
 </template>
 
 <script>
+import BLiveRankItem from 'components/live/BLiveRankItem'
 export default {
-
+	components: {
+		BLiveRankItem
+	}
 }
 </script>
 
 <style lang="stylus">
-	
+	.rank
+		.b-head
+			position relative
+			.b-slt-tab
+				padding-left 0
+				position relative
+				display inline-block
+				vertical-align middle
+				li
+					float left
+					position relative
+					padding 1px 0 2px
+					border-bottom 1px solid transparent
+					height 20px
+					line-height 20px
+					cursor pointer
+					text-align center
+					margin-left 15px
+					&:first-child
+						margin 0
+					&.on
+						background-color transparent
+						border-color #00a1d6
+						color #00aid6
+						.b-tab-text
+								color #00a1d6
+						&:before
+							content ''
+							display block
+							position absolute
+							left 50%
+							margin-left -3px
+							bottom 0
+							width 0
+							height 0
+							border 3px dashed #00a1d6
+							border-bottom-style solid
+							border-top 0
+							border-left-color transparent
+							border-right-color transparent
+		.b-body
+			clear both
+			.r-list-body
+				zoom 1
+				overflow hidden
+				.r-list-wrapper
+					margin-left 0%
+					width 200%
+					&:after
+						content ''
+						display block
+						visibility hidden
+						font-size 0
+						clear both
+						height 0
+					.r-list-live
+						display block
+						width 50%
+						padding-top 20px
+						float left
+
 </style>

+ 103 - 4
src/components/live/BLiveRankItem.vue

@@ -1,7 +1,25 @@
 <template>
-	<div>
-		
-	</div>
+	<li class="live-item">
+		<div class="r-item r-ranking">
+			<div class="lv-num n1">1</div>
+			<a href="" class="preview" target="_blank" title="渗透之C君">
+				<img src="//i0.hdslb.com/bfs/face/623ccce0ab28b721edb61dd64749d91de18fb384.jpg@.webp" alt="渗透之C君">
+			</a>
+			<a href="" target="_blank" title="渗透之C君">
+				<div class="r-i">
+					<p class="r-i-t">
+						<span class="u-name">渗透之C君</span>
+						<span class="u-online">
+							<i class="b-icon b-icon-live-online"></i><em>7.9万</em>
+						</span>
+						<div class="r-i-st">
+							说不定就翻车了
+						</div>
+					</p>
+				</div>
+			</a>
+		</div>
+	</li>
 </template>
 
 <script>
@@ -11,5 +29,86 @@ export default {
 </script>
 
 <style lang="stylus">
-	
+	.live-item
+		margin 0 0 14px 0
+		.r-item
+			overflow hidden
+			position relative
+			&.r-ranking
+				padding-left 25px
+			.lv-num
+				position absolute
+				color #fff
+				height 18px
+				line-height 17px
+				top 0px
+				left 0px
+				font-size 12px
+				min-width 12px
+				text-align center
+				background-color #b8c0cc
+				border-radius 4px
+				z-index 20
+				padding 0 3px 0 3px
+				font-weight bolder
+				&.n1
+					background-color #f25d8e
+			.preview
+				display block
+				float left
+				position relative
+				margin-right 12px
+				img
+					display block
+			img
+				width 40px
+				height 40px
+				border-radius 20px
+			.r-i
+				float left
+				width 180px
+				&:hover 
+					.u-name
+						color #00a1d6
+			.r-i-t
+				line-height 16px
+				overflow hidden
+				.u-name
+					max-width 115px
+					float left
+					white-space nowrap
+					text-overflow ellipsis
+					color #222
+				.u-online
+					max-width 60px
+					float right
+					color #99a2aa
+					line-height 16px
+					overflow hidden
+					white-space nowrap
+					text-overflow ellipsis
+					.b-icon
+						display inline-block
+						width 12px
+						height 12px
+						vertical-align top
+						margin-right 5px
+						margin-top 2px
+						font-style normal
+						font-weight normal
+						&.b-icon-live-online
+							background url(../../assets/images/live-eye.png)
+					em
+						font-style normal
+						font-weight normal
+			.r-i-st
+				margin-top 4px
+				color #99a2aa
+				overflow hidden
+				white-space nowrap
+				text-overflow ellipsis
+				max-width 190px
+				height 16px
+				line-height 16px
+
 </style>