groupPurchaseShare.wxml 6.39 KB

<template name='groupPurchaseShare'>
    <view class="mask" bindtap="shareHide" wx:if="{{sharerData.isShow}}"
    style="background-color:{{sharerData.showType == 1?transparent:'rgba(0, 0, 0, 0.7)'}}">
      <block wx:if="{{sharerData.showType == 1}}">
        <!--分享的图标及文字容器-->
        <view class='bottom-share-container'>
          <view class='share-button-container'>

            <view class='share-icon-text-container' style='margin-left:50rpx'>
              <button class='share-image-button'
                open-type="share"
                catchtap="shareHide">
                <image src='{{sharerData.buttonIcon.wechat}}' class='btn-img'></image>
              </button>
              <view class='share-explain-text'>分享给微信好友</view>
            </view>

            <view class='share-icon-text-container' style='margin-right:50rpx'>
              <button class='share-image-button'
                catchtap="showImage">
                <image src='{{sharerData.buttonIcon.wechatP}}' class='btn-img'></image>
              </button>
              <view class='share-explain-text'>生成海报分享</view>
            </view>

          </view>

          <!-- 分割线 -->
         <view class='divide-line'></view> 

          <button class='cancel-btn' catchtap="shareHide">取消</button>
        </view>
      </block>
      <block wx:else>
        <block wx:if="{{sharerData.showPage == 2}}"><!--拼团结果页快照UI-->
            <!--列表页快照UI-->
          <view style='width: 536rpx;height: wrap;margin-top: 58rpx;background-color:white;display:flex;        flex-direction:column;align-items:center;border:10rpx solid #000000'>
              <view class='new-logo'>
                <image style='width:100%;height:100%;' src='./images/logo.png'></image>
              </view>

              <view class='big-image'>
                <image style='width:100%;height:100%;' src='{{sharerData.openerJoinItem.productIcon}}'></image>
              </view>

              <view class='new-pricecontainer'>
                <view class='product-name'>{{sharerData.openerJoinItem.productName}}</view>
                <view class='price'>
                  <view style='width:70rpx;height:23.8rpx;display:flex;'>
                    <image style='width:100%;height:100%;' src='./images/group_ptj.png'></image>
                  </view>
                  <view class='price-container'>
                    <text class='group-price'>{{sharerData.openerJoinItem.productGroupPrice}}</text>
                  </view>
                  <view class='price-container'>
                    <text class='sale-price'>{{sharerData.openerJoinItem.productSalePrice}}</text>
                  </view>
                </view>

                <view class='stamp'>
                  <image style='width:100%;height:100%;' src='./images/stamp_my.png'></image>
                </view>
              </view>

              <view class='new-bottom'>
                <view style='width:102rpx;height:102rpx'>
                  <image style='width:100%;height:100%;' src='{{sharerData.qrCode}}'></image>
                </view>
                <view class='tip-container'>
                  <view class='new-tip1' style='display:inline'>
                    <text wx:if='{{sharerData.openerJoinItem.nickName}}'
                    class='new-tip1'>{{sharerData.openerJoinItem.nickName}}</text>
                    <text class='new-tip1'>{{sharerData.openerJoinItem.nickName?'邀请你拼潮货':'有货友拼团,潮人的专属福利团'}}</text>
                  </view>
                  
                  <text class='new-tip2' style='margin-top:12rpx'>{{sharerData.openerJoinItem.nickName?'长按图片识别小程序码参团':'长按图片识别小程序查看详情'}}</text>
                </view>
              </view>
                
          </view>
        </block>
        <block wx:if="{{sharerData.showPage == 1}}">
          <!--列表页快照UI-->
          <view style='width: 536rpx;height: wrap;margin-top: 58rpx;background-color:white;display:flex;        flex-direction:column;align-items:center;border:10rpx solid #000000'>
              <view class='new-logo'>
                <image style='width:100%;height:100%;' src='./images/logo.png'></image>
              </view>

              <view class='big-image'>
                <image style='width:100%;height:100%;' src='{{sharerData.defaultImage}}'></image>
              </view>

              <view class='new-bottom'>
                <view style='width:102rpx;height:102rpx'>
                  <image style='width:100%;height:100%;' src='{{sharerData.qrCode}}'></image>
                </view>
                <view class='tip-container'>
                  <text class='new-tip1'>有货友拼团,潮人的专属福利团</text>
                  <text class='new-tip2'>长按图片识别小程序查看详情</text>
                </view>
              </view>
                
          </view>
        </block>

        <view style='width: 536rpx;height: 88rpx;margin-top: 30rpx;background: transparent;display: flex;align-items: center;flex-direction:row;justify-content: center;border-radius: 8rpx' >
          <view class='sava-photo' catchtap="shareSaveImage">
            <text class='save-text'>保存到相册</text>
          </view>
          <view style='width:20rpx;height:100%;background-color:transparent'></view>
          <view class='sava-photo' style='background:white;' catchtap="shareHide">
            <text class='save-text' style='color:#444444'>取消</text>
          </view>
          <!-- <text style='font-size: 32rpx;height:wrap;text-align:center'>生成海报分享</text> -->
        </view>
      </block> 
    </view>
 
<block wx:if="{{sharerData.showPage == 2}}">
    <canvas canvas-id="originalCanvasenlarge" style=' width: {{(sharerData.shareViewWidth)*sharerData.SC*3}}px;height: {{(sharerData.shareViewHeight)*sharerData.SC*3}}px; margin-left: {{(sharerData.windowWidth - (sharerData.shareViewWidth-105)*sharerData.SC)/2}}px;margin-top: {{10000}}px; position: fixed;'></canvas>   
</block>

<block wx:if="{{sharerData.showPage == 1}}">
   <canvas canvas-id="originalCanvasenlargeList" style=' width: {{(sharerData.shareViewWidth)*sharerData.SC*3}}px;height: {{(sharerData.shareViewHeight)*sharerData.SC*3}}px; margin-left: {{(sharerData.windowWidth - (sharerData.shareViewWidth-105)*sharerData.SC)/2}}px;margin-top: {{10000}}px; position: fixed;'></canvas>  
</block>
</template>