snapshootShare.ttml
7.85 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!--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>