snapshootShare.ttml
3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!--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>