snapshootShare.ttml 3.09 KB
<!--pages/snapshootShare/snapshootShare.wxml-->
<view class="snapshoot-container" style="display: {{isShow ?  'block' : 'none'}}" >
   <view class="snapshoot-container">
    <view class="snapshoot-content">
        <view class="snapshoot"  wx:if="{{sourceType==='shop'}}">
          <image class="img-bg" src="{{shareData.bannerUrl}}"></image>
          <view class="snapshoot-shopinfo">
            <image class="img-logo" mode="aspectFit" src="{{shareData.shop_logo}}"> </image>
            <text class="shop-name">{{shareData.shop_name}}</text>
            <text class="shop-intro">{{shareData.shop_intro_simple}}</text>
          </view>
          <view class="shop-miniqr">
            <image class="shop-qrcode" src="{{shareData.shop_qrCode}}"></image>
            <text class="snapshoot-tips">长按扫码查看详情</text>
            <image class="yoho-logo" src="./images/share-logo@2x.png"></image>
          </view>
        </view>
        <view class="snapshoot" wx:elif="{{sourceType==='product'}}">
          <image class="product-img-bg" src="./images/snapshoot_share_bg@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>
                <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.product_qrCode}}"></image>
            <text class="snapshoot-tips">长按扫码查看详情</text>
            <view class='product-tips'>
              <image class="product-tips-img" src="./images/snapshoot_tip_ic@2x.png"></image>
              <text class="product-tips-text">实际价格以页面展示为准</text>
            </view>
          </view>
        </view>
        <view wx:else></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 class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{screenHeight}}px" wx:if="{{sourceType === 'shop'}}">
        <canvas canvas-id="shopCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;"></canvas> 
    </view>
    <view class="snapshoot-canvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px; background-color: white; margin-top: {{screenHeight}}px" wx:elif="{{sourceType === 'product'}}">
        <canvas canvas-id="productDetailCanvas" style="width: {{windowWidth}}px;height:{{screenHeight}}px;background-color: white"></canvas> 
    </view>  
</view>