liveStreamDetails.wxml 3.68 KB
<!--pages/liveStreamDetails/liveStreamDetails.wxml-->
<wxs src="../../../utils/filter.wxs" module="filter"></wxs> 
<wxs src="../../../utils/myUtils.wxs" module="myUtils"></wxs>
<!-- <wxs src="/packageA/pages/liveStreamDetails/wxs.wxs" module="tool"></wxs> -->
<view class="content">
  <!-- 封面标题 -->
  <view class="cover-container">
    <image src="{{details.cover_img}}" class="cover-img" mode="aspectFill"></image>
    <!-- <view class="cover-desc">
      <view>{{details.name}}</view>
      <view>{{filter.format_time(details.start_time)}}</view>
    </view> -->
  </view>

  <!-- 直播详情 -->
  <view class="desc-container">
    <view class="desc-title">{{details.name}}</view>
    <text class="desc-status">{{myUtils.liveStatus(details.live_status)}}</text>
    <!-- <view class="desc-content">
      <view>6月24日20:00锁定直播 盘点年中 「上榜」好货!</view>
      <view>护肤、彩妆、香氛群星汇聚,更有折扣买赠与神秘新品加持~</view>
      <view>多轮抽奖惊喜连连,不容错过!</view>
    </view> -->
  </view>
    
  <!-- 列表 -->
  <view class="list">
    <!-- 列表项 -->
    <block wx:for="{{details.goods}}">
      <view class="list-item" bindtap="clickgoods" data-url="{{item.url}}">
      <!-- {{item}} -->
        <image src="{{item.cover_img}}" class="item-pic"></image>
        <view class="item-desc-container">
          <view class="item-desc">
            <!-- <view>WEI</view> -->
            <view>{{item.name}}</view>
          </view>
          <view class="item-price">{{item.price}}</view>
        </view>
      </view>
    </block>
    
  </view> 

  <!-- 回放直播 -->
  <view class="btn-container">
    <subscribe wx:if="{{details.live_status === '102'}}" class="btn" room-id="{{details.roomid}}" stopPropagation="{{true}}"></subscribe>
    <view wx:else class="btn" bindtap="clickBtn">{{btnText}}</view>
  </view>
  
  <!-- 分享 -->
  <view class="share-container">
    <image src="/packageA/images/liveStreamDetails/share.jpg" bindtap="clickShare"></image>
    <image src="/packageA/images/liveStreamDetails/home.jpg" bindtap="backHome"></image>
  </view>

  <!-- actionSheet -->
  <view class="{{showActionSheet ? 'share-actionSheet':'share-actionSheet active'}}" hidden="{{showActionSheet}}">
    <view class="share-actionSheet-title">分享</view>
      <view class="share-actionSheet-list">
        <view class="share-actionSheet-item" hover-class="active">
          <button open-type="share">
            <image src="/packageA/images/liveStreamDetails/friend.jpg" class="share-actionSheet-pic"></image>
            <text class="share-actionSheet-desc">发送给朋友</text>
          </button>
        </view>
        <view class="share-actionSheet-item" hover-class="active" bindtap="createPlaybill">
          <image src="/packageA/images/liveStreamDetails/circle.jpg" class="share-actionSheet-pic"></image>
          <text class="share-actionSheet-desc">生成分享海报</text>
        </view>
      </view>
      <view class="share-actionSheet-cancle" bindtap="hiddenActionSheet">取消</view>
  </view>

  <!-- 生成海报 -->
  <view class="{{showPlaybill ? 'playbill':'playbill active'}}" hidden="{{showPlaybill}}">
    <!-- <image src="{{canvasToImgPath}}" class="playbill-pic"></image> -->
    <canvas canvas-id="myCanvas" class="playbill-pic" style="width:{{windowWidth*dpr}};height:width:{{windowHeight*dpr}}"></canvas>
    <view class="playbill-save" bindtap="onSaveToPhone">
      <image src="/packageA/images/liveStreamDetails/save.jpg"></image>保存至相册
    </view>
  </view>

  <!-- mask -->
  <!-- 这里mask必须强制放在actionsheet和playbill的后面 -->
  <view class="mask"  bindtap="hiddenActionSheet"></view>

</view>