Browse Source

Fix: search list bug and some styles

chinadelu 5 years ago
parent
commit
c43f92c8d4
5 changed files with 27 additions and 5 deletions
  1. 2 2
      pages/details/details.wxml
  2. 14 1
      pages/details/details.wxss
  3. 7 1
      pages/index/index.wxml
  4. 1 1
      pages/search/search.wxml
  5. 3 0
      style/common.wxss

+ 2 - 2
pages/details/details.wxml

@@ -32,7 +32,7 @@
 <view class="Performance">
   <view class="selectbar">
     <view class="detail">详情</view>
-    <view class="list">节目<text>152</text>
+    <view class="list active">节目<text>152</text>
     </view>
   </view>
   <!-- 播放选项 -->
@@ -48,7 +48,7 @@
   <!-- 节目列表 -->
   <view class="performanceContent" wx:for="{{performance}}" wx:key="index">
     <!-- 序号 -->
-    <view class="performanceIndex">{{index}}</view>
+    <view class="performanceIndex">{{index+1}}</view>
     <!-- 节目标题 -->
     <view class="performanceInfo">
       <view class="performanceInfoTop">

+ 14 - 1
pages/details/details.wxss

@@ -108,7 +108,7 @@
 .selectbar {
   width: 100%;
   height: 100rpx;
-  padding: 20rpx 0rpx;
+  line-height: 100rpx;
   text-align: center;
   display: flex;
   justify-content: space-between;
@@ -193,3 +193,16 @@
   font-size: 25rpx;
   margin-top: 20rpx;
 }
+.active{
+  position: relative;
+  color: #333;
+}
+.active::after{
+  content: '';
+  width: 80rpx;
+  height: 5rpx;
+  position: absolute;
+  bottom: 0rpx;
+  left: 150rpx;
+  background-color: orangered;
+}

+ 7 - 1
pages/index/index.wxml

@@ -26,7 +26,13 @@
 <view class="nav">
   <block>  
     <view class="navItem" bindtap="{{item.events}}" wx:for="{{navList}}"  wx:key="index">
-      <!-- 因为没有合适的图,所以全部使用的一样的 -->
+      <!-- 
+        
+        因为没有合适的图,所以全部使用的一样的 
+        并且因为界面都是一致的就是内容不同,这里为了简单,使用的都是统一界面
+
+        解决办法:你可以通过页面传参的方式来进行区分
+        -->
       <image class="navIcon" src="{{item.icon}}" mode="widthFix" lazy-load="false"></image>
       <text class="navText">{{item.text}}</text>
     </view>

+ 1 - 1
pages/search/search.wxml

@@ -32,7 +32,7 @@
 	<view class="hot-content">
 		<view class="hot-items" wx:for="{{hotData}}" wx:key="index">
 			<view class="item-left">
-				<view class="text-red">{{index}}</view>
+				<view class="{{index < 3 ? 'text-red' : ''}}">{{index + 1}}</view>
 				<view class="itemTitle">{{item.title}}</view>
 			</view>
 			<text class="{{item.icon}} itemIcon {{item.color}}"></text>

+ 3 - 0
style/common.wxss

@@ -127,4 +127,7 @@
 }
 .text-orange{
   color: orange;
+}
+.text-gray{
+  color: #aaaaaa;
 }