<view style="height: 14rpx;"></view>
<My_NavTabs tabsList="{{tabsList}}" tabsIndex="{{tabsIndex}}" bindsetIndex="setIndex" liveDownload="{{true}}" />
<!-- 私域直播 -->
<My_liveAccountMsg wx:if="{{tabsIndex==0}}" accountStatus="{{accountStatus}}" accountMsg="{{accountMsg}}"></My_liveAccountMsg>
<!-- 展会直播 -->
<My_liveAccountMsg wx:else accountStatus="{{accountStatus}}" accountMsg="{{accountMsg}}" isSY="{{false}}"></My_liveAccountMsg>
<!-- 数据 -->
<view wx:if="{{accountStatus==1}}" class="msgBox clearfix" style="white-space:nowrap;">
    <!-- 标题和按钮 -->
    <view class="msgBox-title-and-but">
        <view wx:if="{{dataTypes==0}}" class="msgBox-title">直播数据</view>
        <view wx:else class="msgBox-title">直播场次:{{showStartTime}}</view>
        <view wx:if="{{dataTypes==1}}" class="dataReturn" catchtap="returnLiveData">
            <van-icon style="margin-right: -10rpx;" name="arrow-left" />
            <van-icon style="margin-right: -5rpx;" name="arrow-left" />
            返回场次列表
        </view>
    </view>
    <!-- 数据表格 -->
    <view hidden="{{dataTypes!=0}}">
        <!-- 数据宫格 -->
        <view class="data-grid">
            <view>
                <view class="title">观看次数(次)</view>
                <view class="number">{{liveDataCount.viewCounts}}</view>
            </view>
            <view>
                <view class="title">观看人数(人)</view>
                <view class="number">{{liveDataCount.viewers}}</view>
            </view>
            <view>
                <view class="title">观看时长(分钟)</view>
                <view class="number">{{liveDataCount.viewDuration}}</view>
            </view>
            <view>
                <view class="title">人均观看次数(次)</view>
                <view class="number">{{liveDataCount.viewCountsAvg}}</view>
            </view>
            <view>
                <view class="title">人均观看时长(分钟)</view>
                <view class="number">{{liveDataCount.viewDurationAvg}}</view>
            </view>
        </view>
        <block wx:if="{{liveSessionList.length>=1}}">
            <scroll-view scroll-x="{{true}}" class="data-formlist">
                <!-- 表头 -->
                <view class="data-formlist-header">
                    <view class="w200rpx">开始时间</view>
                    <view style="width: 180rpx;">直播id</view>
                    <view style="width: 160rpx;">观看次数(次)</view>
                    <view style="width: 200rpx;">观看时长(分钟)</view>
                    <view style="width: 240rpx;">描述</view>
                </view>
                <!-- 表格 -->
                <view wx:for="{{liveSessionList}}" wx:key="index" class="data-formlist-row {{optionRow==index?'option-row':''}}" data-index="{{index}}" catchtap="optionItemIndex">
                    <view class="w200rpx u-line-1">{{item.starttime}}</view>
                    <view class="u-line-1" style="width: 180rpx;">{{item.sessionid}}</view>
                    <view class="u-line-1" style="width: 160rpx;">{{item.liveuv}}</view>
                    <view class="u-line-1" style="width: 200rpx;">{{item.duration}}</view>
                    <view class="u-line-1" 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" data-index="{{index}}" catchtap="viewDetails">更多</view>
                    </view>
                </view>
            </scroll-view>
        </block>
    </view>
    <!-- 数据宫格 -->
    <view hidden="{{dataTypes!=1}}">
        <view class="data-grid">
            <view>
                <view class="title">观看次数(次)</view>
                <view class="number">{{liveDataCountForSession.viewCounts}}</view>
            </view>
            <view>
                <view class="title">观看人数(人)</view>
                <view class="number">{{liveDataCountForSession.viewers}}</view>
            </view>
            <view>
                <view class="title">观看时长(分钟)</view>
                <view class="number">{{liveDataCountForSession.viewDuration}}</view>
            </view>
            <view>
                <view class="title">人均观看次数(次)</view>
                <view class="number">{{liveDataCountForSession.viewCountsAvg}}</view>
            </view>
            <view>
                <view class="title">人均观看时长(分钟)</view>
                <view class="number">{{liveDataCountForSession.viewDurationAvg}}</view>
            </view>
        </view>
        <scroll-view scroll-x="{{true}}" class="data-formlist">
            <!-- 表头 -->
            <view class="data-formlist-header live-for-details">
                <view class="w200rpx">用户名称</view>
                <view style="width: 180rpx;">用户id</view>
                <view style="width: 160rpx;">观看时长</view>
                <view style="width: 240rpx;">进入时间</view>
                <view style="width: 140rpx;">地区</view>
                <view style="width: 140rpx;">城市</view>
                <view style="width: 200rpx;">观众ip</view>
                <view style="width: 180rpx;">观看终端</view>
                <view style="width: 140rpx;">场次</view>
                <view style="width: 180rpx;">观看类型</view>
            </view>
            <!-- 表格 -->
            <view wx:for="{{liveUserList}}" class="data-formlist-row live-for-details">
                <view class="w200rpx u-line-1">{{item.name}}</view>
                <view class="u-line-1" style="width: 180rpx;">{{item.userid}}</view>
                <view class="u-line-1" style="width: 160rpx;">{{item.playduration}}</view>
                <view class="u-line-1" style="width: 240rpx;">{{item.datetime}}</view>
                <view class="u-line-1" style="width: 140rpx;">{{item.province}}</view>
                <view class="u-line-1" style="width: 140rpx;">{{item.city}}</view>
                <view class="u-line-1" style="width: 200rpx;">{{item.ipaddress}}</view>
                <view class="u-line-1" style="width: 180rpx;">{{item.ismobile=='Y'?'手机':'电脑'}}</view>
                <view class="u-line-1" style="width: 140rpx;">{{item.viewcount}}</view>
                <view class="u-line-1" style="width: 180rpx;">{{item.viewtype=='live'?'直播':'回放'}}</view>
            </view>
        </scroll-view>
    </view>
    <view wx:if="{{liveSessionList.length>=1}}" class="paging-button">
        <view>
            <van-button custom-class="paging-button-class" catchtap="buttonRightClick"></van-button>
            <view class="paging-button-icon icon-right">
                <van-icon name="arrow" />
            </view>
        </view>
        <text>{{dataTypes==0?pageNumber:userPageNumber}}</text>
        <view>
            <van-button custom-class="paging-button-class" catchtap="buttonLifeClick"></van-button>
            <view class="paging-button-icon icon-left">
                <van-icon name="arrow-left" />
            </view>
        </view>
    </view>
</view>