taskDetail.wxml 3.62 KB
<!--packageActivity/pages/taskDetail/taskDetail.wxml-->
<wxs module="fn">
  var indexOf = function(e, num) {
    return e.indexOf(num) > -1
  }
  module.exports.indexOf = indexOf
</wxs>
<view class="task-detail-box">
  <view class="title">任务</view>
  <view class="task-box">
    <view class="left">
      <image webp src="{{IMGURL}}task_icon_{{detailInfo.missonType}}.png"></image>
      <view class="text-message">
        <view class="name">{{detailInfo.missionName}}</view>
        <view>{{detailInfo.missonDesc}}</view>
      </view>
    </view>
    <view class="right">
      <image webp src="{{IMGURL}}integral_icon.png"></image>
      <view>+{{detailInfo.gainScore}}积分</view>
    </view>
  </view>
  <!-- 分享内容 -->
  <view class="title">分享内容</view>
  <view class="share-box" wx:if="{{detailInfo.missonType == 2}}">
    <image  class="bg" webp src="{{IMGURL}}taskDetail_bg.png"></image>
    <view class="user-box">
      <image webp src="{{userStorage.weChatAvatarUrl ? userStorage.weChatAvatarUrl : IMGURL + 'order_person_default.png'}}"></image>
      <view class="message">
        <view class="name">{{userStorage.name || ""}}<text>邀请你参加</text></view>
        <view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
      </view>
    </view>
    <view class="content" wx:if="{{!fn.indexOf(materialTypeArr, 4) && detailInfo.platformMerchantMissionMaterialResponseList.length}}">
      <view class="text-box">
        <mp-html content="{{detailInfo.filterTextContent}}"></mp-html>
      </view>
      <view class="img_video">
        <block wx:for="{{detailInfo.imgUrlList}}" wx:key="index">
          <view wx:if="{{item.type == 'image'}}" class="image-box">
            <image class="image-box" bind:tap="previewMedia" data-current="{{index}}" src="{{item.url}}"></image>
          </view>
          <view wx:else class="video-box" bind:tap="previewMedia" data-current="{{index}}">
            <image class="paly-icon" webp src="{{IMGURL}}video_paly_icon.png"></image>
            <video controls="{{false}}" show-center-play-btn="{{false}}" show-fullscreen-btn="{{false}}" src="{{item.url}}"></video>
          </view>
        </block>
      </view>
    </view>
  </view>
  <!-- 专属链接 -->
  <view wx:if="{{detailInfo.missonType != 2 || fn.indexOf(materialTypeArr, 4)}}">
    <view class="copyWriting">将链接转发给好友或发送朋友圈可提高活动曝光度</view>
    <view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}">
      <image src="{{detailInfo.activityImage ? detailInfo.activityImage : IMGURL+'share_task_default_img.png'}}"></image>
      <view class="right">
        <view>{{detailInfo.activityName}}</view>
        <view class="type-text">{{activityTypList[0]}}活动</view>
      </view>
    </view>
  </view>
  <view class="btn-box">
    <view class="btn" wx:if="{{fn.indexOf(materialTypeArr, 1)}}" bind:tap="copyText">复制文案</view>
    <view class="btn" wx:if="{{detailInfo.missonType != 2 || fn.indexOf(materialTypeArr, 4)}}" bind:tap="copyUrl">复制链接</view>
    <view class="btn" bind:tap="saveWith" wx:if="{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3)}}">
      <text>一键保存{{fn.indexOf(materialTypeArr, 2) ? '图片' : '视频'}}</text>
      <van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
    </view>
    <!-- <view class="btn primary" bind:tap="share">分享</view> -->
    <button class="btn primary" wx:if="{{detailInfo.missonType == 2 && !fn.indexOf(materialTypeArr, 4)}}" open-type="share">分享</button>
  </view>
</view>