snapshootShare.ttml 7.85 KB
<!--pages/snapshootShare/snapshootShare.wxml-->
<view class="snapshoot-container {{sourceType === 'guang' ? 'guang-snapshoot' : ''}}" style="display: {{isShow ?  'block' : 'none'}}" >
   <view class="snapshoot-container">
    <view class="snapshoot-content">
        <view class="snapshoot" style='height:wrap' tt:if="{{sourceType==='shop'}}">
          <image class="yoho-logo" style='margin-top:50.4rpx' src="./images/share-logo@2x.png"></image>
          <view class="snapshoot-shopinfo">
            <image class="img-bg" src="{{shareData.bannerUrl}}"></image>
            <text class="shop-name">{{shareData.shop_name}}</text>
            <text class="shop-intro" style='margin-top:17.8rpx'>{{shareData.shop_intro_simple}}</text>
            <image class="img-logo" style='margin-bottom:40rpx;margin-top:54.6rpx' mode="aspectFit" src="{{shareData.shop_logo}}"> </image>
          </view>
           <view class='product-miniqr-new'>
              <image class="product-qrcode" mode='aspectFit' src="{{shareData.shop_qrCode}}"></image>
              <view class='product-tips-new'>
                 <text class="snapshoot-tips-new">长按扫码查看详情</text>
                 <text class="product-tips-text-new" style='margin-top:10.4rpx;margin-left:0rpx'>或者在各大应用市场搜索Yoho!Buy有货下载App</text>
              </view>
          </view>
        </view>

         <!--商品详情开始  -->
        <view class="snapshoot" tt:elif="{{sourceType==='product'}}">
          <image class="yoho-logo" style='margin-top:50.4rpx' src="./images/share-logo@2x.png"></image>
          <view class="snapshoot-productinfo">
              <image class="product-defaultImage" src="{{shareData.default_image}}"> </image>
              <view class="product-info-content">
                <text class="product-name">{{shareData.product_name}}</text>
                <view > 
                <text class="product-price">{{shareData.product_price==='0'?shareData.product_mprice:shareData.product_price}}</text>
                <text class="market-price" style="display:{{shareData.product_mprice === '0'?'none':''}}">{{shareData.product_mprice}}</text>
                </view>
                
              </view>
          </view>
          <view class='product-miniqr-new'>
              <image class="product-qrcode" src="{{shareData.product_qrCode}}"></image>
              <view class='product-tips-new'>
                 <text class="snapshoot-tips-new">长按扫码查看详情</text>
                 <text class="product-tips-text-new" style='margin-top:10.4rpx;margin-left:0rpx'>实际价格以页面展示为准</text>
              </view>
          </view>
        </view>

        <!--新的一个view  -->
        <view class="snapshoot" tt:elif="{{sourceType==='product_union'}}">
          <image class="product-img-bg" src="https://cdn.yoho.cn/uploads/1543917772613/snapshoot_share_bg@2x.png"></image>
          <view class="snapshoot-union" style='border-radius: 30rpx;'>
              <image class="product-defaultImage" style='border-radius: 30rpx;' src="{{shareData.default_image}}"> </image>
              <view class="product-info-content" style='border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;'>
                <text class="product-name">{{shareData.product_name}}</text>
                <text class="product-price">{{shareData.product_price}}</text>
              </view>
          </view>
          <view class="product-miniqr">
            <image class="yoho-logo" src="./images/share-logo@2x.png"></image>
            <image class="product-qrcode" src="{{shareData.union_qrCode}}"></image>
            <text class="snapshoot-tips">长按扫码查看详情</text>
            <view class='product-tips'>
              <text class="product-tips-text">或者在各大应用市场搜索Yoho!Buy有货 下载App</text>
            </view>
          </view>
        </view>

        <!--列表页view  -->
        <view class="snapshoot" tt:elif="{{sourceType==='list_union'}}">

          <image class="yoho-logo" style='margin-top:50.4rpx' src="./images/share-logo@2x.png"></image>
          <view class="snapshoot-productinfo">
              <image class="product-defaultImage" src="{{shareData.default_image}}"> </image>
              <view class="product-info-content">
                <text class="list-title-new" >{{shareData.title}}</text>
                <text class="list-content" style='font-size:16.8rpx'>{{shareData.content}}</text>
              </view>
          </view>
          <view class='product-miniqr-new'>
              <image class="product-qrcode" mode='aspectFit' src="{{shareData.union_qrCode}}"></image>
              <view class='product-tips-new'>
                 <text class="snapshoot-tips-new">长按扫码查看详情</text>
                 <text class="product-tips-text-new" style='margin-top:10.4rpx;margin-left:0rpx'>或者在各大应用市场搜索Yoho!Buy有货 下载App</text>
              </view>
          </view>
        </view>

        <!--逛详情开始  -->
        <view class="snapshoot" tt:elif="{{sourceType==='guang'}}">
          <image class="yoho-logo" style='margin-top:50.4rpx' src="./images/share-logo@2x.png"></image>
          <view class="snapshoot-guang-info">
              <image class="guang-cover-image" src="{{shareData.cover_image}}"> </image>
              <view class="guang-info-content">
                <text class="guang-desc">潮流资讯,新鲜贩售,Yoho!Buy有货【逛】不停</text>
                <text class="guang-name">{{shareData.article_title}}</text>
              </view>
              <view class="guang-tag" tt:if="{{shareData.tag}}">#{{shareData.tag}}#</view>
          </view>
          <view class='product-miniqr-new'>
              <image class="product-qrcode" mode='aspectFit' src="{{shareData.guang_qrCode}}"></image>
              <view class='product-tips-new'>
                 <text class="snapshoot-tips-new">长按扫码查看详情</text>
                 <text class="product-tips-text-new" style='width: 300rpx;margin-top:10.4rpx;margin-left:0rpx'>或者在各大应用市场搜索Yoho!Buy有货 下载App</text>
              </view>
          </view>
        </view>
    </view>  
    
    <!--底部按钮  -->
    <view class="snapshoot-bottom">
      <view class="snapshoot-save" bindtap="saveToAlbum">
        <!-- <image class="img" src="./images/down@2x.png"></image> -->
        <text class="text">保存到相册</text>
      </view>
      <view class="snapshoot-cancel" bindtap="hidden">
          <text class="cancel-text">取消</text>
      </view>
    </view>
   </view>   
</view>

      <block tt:if="{{sourceType === 'shop'}}">
        <canvas canvas-id="shopCanvas" style="width: {{snapFixedWidth}}px;height:{{snapFixedHeight}}px;background-color: white;margin-left:10000px;position:fixed"></canvas> 
    </block>
    <block tt:elif="{{sourceType === 'product'}}">
        <canvas canvas-id="productDetailCanvas" style="width: {{snapFixedWidth}}px;height:{{snapFixedHeight}}px;background-color: white;margin-left:10000px;position:fixed"></canvas> 
    </block>  
    <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{screenHeight}}px" tt:elif="{{sourceType === 'product_union'}}">
        <canvas canvas-id="product_unionCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white;margin-left:10000px;position:fixed"></canvas> 
    </view>
    <block tt:elif="{{sourceType === 'list_union'}}">
        <canvas canvas-id="list_unionCanvas" style="width: {{snapFixedWidth}}px;height:{{snapFixedHeight}}px;background-color: white;margin-left:10000px;position:fixed"></canvas> 
    </block>
     <block tt:elif="{{sourceType === 'guang'}}">
        <canvas canvas-id="guangCanvas" style="width: {{snapFixedWidth}}px;height:{{snapFixedHeight}}px;background-color: white;margin-left:10000px;position:fixed"></canvas> 
    </block>