正在显示
3 个修改的文件
包含
49 行增加
和
2 行删除
@@ -112,13 +112,14 @@ | @@ -112,13 +112,14 @@ | ||
112 | <p>分享:</p> | 112 | <p>分享:</p> |
113 | <input type="hidden" class="collection" value=""> | 113 | <input type="hidden" class="collection" value=""> |
114 | <input type="hidden" class="like" value=""> | 114 | <input type="hidden" class="like" value=""> |
115 | - <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt=""> | 115 | + <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt="" onclick="wxShow()"> |
116 | <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt="" class="wb_share_video"> | 116 | <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt="" class="wb_share_video"> |
117 | <img id="collections" src="__TMPL__/public/assets/starImg/bicon_02.png" alt=""> | 117 | <img id="collections" src="__TMPL__/public/assets/starImg/bicon_02.png" alt=""> |
118 | <img id="likes" src="__TMPL__/public/assets/starImg/bicon_031.png" alt=""> | 118 | <img id="likes" src="__TMPL__/public/assets/starImg/bicon_031.png" alt=""> |
119 | </div> | 119 | </div> |
120 | </div> | 120 | </div> |
121 | </div> | 121 | </div> |
122 | + <include file="public@share" /> | ||
122 | <include file="public@footer" /> | 123 | <include file="public@footer" /> |
123 | <script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script> | 124 | <script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script> |
124 | <script src="__TMPL__/public/assets/js/public.js"></script> | 125 | <script src="__TMPL__/public/assets/js/public.js"></script> |
@@ -211,10 +211,11 @@ | @@ -211,10 +211,11 @@ | ||
211 | height: 290px; | 211 | height: 290px; |
212 | position: fixed; | 212 | position: fixed; |
213 | top: 20%; | 213 | top: 20%; |
214 | - left: 45%; | 214 | + left: 40%; |
215 | background: #F8F8F8; | 215 | background: #F8F8F8; |
216 | padding: 10px 6px 10px 15px; | 216 | padding: 10px 6px 10px 15px; |
217 | display: none; | 217 | display: none; |
218 | + z-index: 999999; | ||
218 | } | 219 | } |
219 | .bd_weixin_popup_foot{ | 220 | .bd_weixin_popup_foot{ |
220 | font-size: 12px; | 221 | font-size: 12px; |
public/themes/simpleboot3/public/share.html
0 → 100644
1 | +<!-- 二维码弹出层 --> | ||
2 | +<div class="wx-qrcode-wrapper"> | ||
3 | + <!-- 遮罩层 --> | ||
4 | + <div class="mask"></div> | ||
5 | + <div class="wx-qrcode" style="width:230px;"> | ||
6 | + <div class="share"> | ||
7 | + <span style="font-size: 14px;text-align: center;">分享到微信朋友圈</span> | ||
8 | + <!-- 关闭图标 --> | ||
9 | + <a href="javascript:;" class="icon-close2" onclick="wxHide()">×</a> | ||
10 | + </div> | ||
11 | + | ||
12 | + <!-- 生成的二维码容器 --> | ||
13 | + <div id="qrcode"></div> | ||
14 | + <div class="bd_weixin_popup_foot"> | ||
15 | + 打开微信,点击底部的“发现”,<br> | ||
16 | + 使用“扫一扫”即可将网页分享至朋友圈。 | ||
17 | + </div> | ||
18 | + </div> | ||
19 | +</div> | ||
20 | +<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> | ||
21 | +<script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script> | ||
22 | +<script> | ||
23 | + var url = window.location.href; | ||
24 | + /* 生成二维码 */ | ||
25 | + $("#qrcode").qrcode({ | ||
26 | + text: url, //设置二维码内容 | ||
27 | + render: "canvas", //设置渲染方式 | ||
28 | + width: 220, //设置宽度,默认生成的二维码大小是 256×256 | ||
29 | + height: 220, //设置高度 | ||
30 | + typeNumber: -1, //计算模式 | ||
31 | + background: "#ffffff", //背景颜色 | ||
32 | + foreground: "#000000" //前景颜色 | ||
33 | + }); | ||
34 | + | ||
35 | + /* 点微信图标,触发二维码弹出层显示 */ | ||
36 | + function wxShow() { | ||
37 | + $('.wx-qrcode-wrapper').show() | ||
38 | + } | ||
39 | + | ||
40 | + /* 关闭二维码弹出层 */ | ||
41 | + function wxHide() { | ||
42 | + $('.wx-qrcode-wrapper').hide() | ||
43 | + } | ||
44 | + | ||
45 | +</script> |
-
请 注册 或 登录 后发表评论