zhaoxiaohai 4 years ago
parent
commit
a37001e73d
3 changed files with 37 additions and 1 deletions
  1. 9 0
      pages/liveStreaming/index.js
  2. 4 1
      pages/liveStreaming/index.wxml
  3. 24 0
      pages/liveStreaming/index.wxss

+ 9 - 0
pages/liveStreaming/index.js

@@ -15,6 +15,7 @@ Page({
     liveSessionList: {}, //直播场次列表
     pageNumber: 1, //当前页码
     pageTotal: 1, //列表总页数
+    optionRow: -1, //列表选中项
   },
 
   /**
@@ -99,6 +100,14 @@ Page({
       })
     })
   },
+  optionItemIndex(e) {
+    const {
+      index
+    } = e.currentTarget.dataset;
+    this.setData({
+      optionRow: index
+    })
+  },
   /* 下一页 */
   buttonRightClick() {
     if (this.data.pageNumber == this.data.pageTotal) return wx.showToast({

+ 4 - 1
pages/liveStreaming/index.wxml

@@ -86,7 +86,7 @@
             <view style="width: 240rpx;">描述</view>
         </view>
         <!-- 表格 -->
-        <view wx:for="{{liveSessionList}}" class="data-formlist-row">
+        <view wx:for="{{liveSessionList}}" class="data-formlist-row {{optionRow==index?'option-row':''}}" data-index="{{index}}" catchtap="optionItemIndex">
             <view class="w200rpx">{{item.starttime}}</view>
             <view style="width: 180rpx;">{{item.sessionid}}</view>
             <view style="width: 160rpx;">{{item.liveuv}}</view>
@@ -94,6 +94,9 @@
             <view style="width: 240rpx; display: flex; align-items: center;">
                 <input disabled="{{true}}" style="width: 100%; text-align: center;" type="text" value="{{item.description==null?'暂无':item.description}}" />
             </view>
+            <view class="more-but-box" wx:if="{{optionRow==index}}">
+                <view class="more-but">更多</view>
+            </view>
         </view>
     </scroll-view>
     <view class="paging-button">

+ 24 - 0
pages/liveStreaming/index.wxss

@@ -157,6 +157,7 @@
 }
 
 .data-formlist-row {
+    position: relative;
     font-size: 20rpx;
     color: rgba(0, 0, 0, 0.65);
     min-width: 1030rpx;
@@ -166,6 +167,29 @@
     text-align: center;
     height: 56rpx !important;
 }
+.option-row{
+    background-color: #FAFAFA;
+}
+
+.data-formlist-row .more-but-box {
+    position: absolute;
+    width: 100%;
+    height: 30rpx;
+    top: 12rpx;
+}
+
+.more-but-box .more-but {
+    position: fixed;
+    width: 68rpx;
+    height: 30rpx;
+    line-height: 30rpx;
+    background: #4DC2D4;
+    box-shadow: 4rpx 4rpx 4rpx 0px rgba(0, 0, 0, 0.06);
+    border-radius: 15rpx;
+    right: 35rpx;
+    font-size: 20rpx;
+    color: #FFFFFF;
+}
 
 .data-formlist-row>view {
     float: left;