当前位置:网站首页>Web page H5 wechat sharing
Web page H5 wechat sharing
2022-06-13 08:45:00 【variation8】
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"/> <link rel="dns-prefetch" href="//www.cdpll.cn"/> <link href=”http://www.cdpll.cn/" rel=”prefetch” /> <title>{$content.title}</title> <meta name="description" content=" Chengdu fislock Electronic Technology Co., Ltd "> <link rel="stylesheet" href="__JS__/layui/css/layui.css"> <script src="__JS__/jquery.min.js"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b96deb050e9a6b89ae554e77cf2331c3"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <style> @media screen and (min-width: 320px) and (max-width: 500px) { .content{ -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; pointer-events:none; } img { width: 100%; height: auto; } video { width: 100%; height: auto; } .bg { position: relative } .tel { width: 100%; height: 50px; background: #006dcc; color: white; line-height: 50px; font-size: 1.6rem; text-align: center; } .tel a { color: white; } .content { margin-top: 30px; padding: 0 15px; } .con{ } #go_top { cursor: pointer; position: fixed; _position: absolute; right: 23px; bottom: 60px; width: 30px; height: 30px; z-index: 60; display: none; } } @media only screen and (min-width: 500px){ body{ text-align:center; } .header{ width: 750px; margin: 0 auto; text-align: center; } img { width: 750px; height: auto; } video { width: 750px; height: auto; } .bg { position: relative } .tel { position: relative; width: 750px; height: 50px; background: #006dcc; color: white; line-height: 50px; font-size: 2rem; text-align: center; left: 50%; margin-left: -375px; } .tel a { color: white; } .content { position: relative; text-align: center; width: 750px; display: block; left: 50%; margin-left: -375px; } } </style> </head> <body> <if class="header"> <div class="bg" οncοntextmenu='return false' οndragstart='return false' onselectstart ='return false' οnselect='document.selection.empty()' οncοpy='document.selection.empty()' onbeforecopy='return false' οnmοuseup='document.selection.empty()'> <img src="__STATIC__/images/top.jpg"> </div> {if $content.type eq 1} <div class="con"> <script> $(document). window.open('https://view.officeapps.live.com/op/view.aspx?src='+encodeURI(/public{$content.file})); </script> <iframe src='https://view.officeapps.live.com/op/view.aspx?src=+encodeURI(/public{$content.file}' > </iframe> </div> {elseif $content.type eq 2 /} <div class="con"> <iframe style="width: 100%;height:1500px;" src="__JS__/web/viewer.html?file=/public{$content.file}"></iframe> </div> {else/} <div class="content" οncοntextmenu='return false' οndragstart='return false' onselectstart ='return false' οnselect='document.selection.empty()' οncοpy='document.selection.empty()' onbeforecopy='return false' οnmοuseup='document.selection.empty()'> {$content.content} </div> {/if} <div class="tel"> <a href="tel:xxx"> Customer consultation <span style="font-size: small">( Yang Xue )</span></a> </div> <a id="go_top" href="javascript:void(0);"><img style="width: 30px;" src="__STATIC__/images/gotop1.png"></a> </div> <script src="__JS__/layui/layui.all.js"></script> <script type="text/javascript" src="__JS__/jquery.media.js"></script> <!-- Introducing WeChat SDK--> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script> function init_gotop() { $(document).scroll(function() { var y = $(this).scrollTop(); if (y > 600) { $('#go_top').fadeIn(); } else { $('#go_top').fadeOut(); } }); $('#go_top').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);return false;}); } $(document).ready(function(){ init_gotop(); }); var url=encodeURIComponent(window.location.href.split('#')[0]);// Share again after successful sharing , Wechat will again url Secondary sharing signature error caused by additional parameters , Deal with it here to avoid config:invalid signature Invalid signature $.ajax({ type : "get", url : "http://www.cdpll.cn/jssdk.php?url="+url,// Replace URL ,xxx According to oneself jssdk File location modification dataType : "jsonp", jsonp: "callback", jsonpCallback:"success_jsonpCallback", success : function(data){ wx.config({ debug: false, // Turn on debugging mode , Call all api The return value of will be on the client side alert come out , To see the parameters passed in , Can be in pc End open , The parameter information will go through log play , Only in pc Only when the end is printed appId: data.appId, timestamp: data.timestamp, nonceStr: data.nonceStr, signature: data.signature, jsApiList: [ "onMenuShareTimeline", // Share with friends "onMenuShareAppMessage", // Share with friends "onMenuShareQQ", // Share the QQ "onMenuShareWeibo" // Share to Weibo ] }); }, error:function(data){ alert(JSON.stringify(data)); //alert(" The connection fails !"); } }); wx.ready(function (){ var shareData = { title: '{$content.title}', desc: "{$content.introduction}",// Please pay special attention to the removal of html link: window.location.href, imgUrl: 'http://www.cdpll.cn/public{$content.thumb}'// Change to your own domain name }; wx.onMenuShareAppMessage(shareData); wx.onMenuShareTimeline(shareData); wx.onMenuShareQQ(shareData); wx.onMenuShareWeibo(shareData); }); </script> </body> </html> <noscript> <iframe scr="*.htm"></iframe> </noscript>
边栏推荐
- 抖音关键词搜索列表接口,超详细的接口对接步骤
- Logstash failed to create queue
- d3.js&nvd3. JS - how to set the y-axis range - d3 js & nvd3. js — How to set y-axis range
- On the use of regular expressions (bracket problem)
- JS - print 99 multiplication table of the for cycle case
- Namespace in TS (2)
- JD commodity detail interface, JD detail page interface, baby detail page interface, commodity attribute interface, commodity information query, commodity detail interface, H5 details, JD app details,
- When submitting the laravel admin form and using the required verification, an error is reported when the value is 0
- array_ Pop error: only variables should be passed by reference
- JS ask for the day of the year
猜你喜欢
Browser render passes
JS - print 99 multiplication table of the for cycle case
DIY无人机(匿名拓控者P2+F330机架)
A solution to create a new EXCEL workbook on win10 computer and change the suffix to xlsm (normally it should be xlsx)
Problems in the deconstruction and assignment of objects, comparison between empty strings and undefined
容器概念和云原生
Shellshock Attack Lab
ADT Google browser plug-in ad Terminator
1.SolidWorks各模块的学习顺序
Invalid flex layout setting width
随机推荐
DIY UAV (anonymous controller p2+f330 rack)
Gbase 8A v95 vs v86 compression strategy analogy
Uni app essay
Logstash configuration reference article
4、 Js-es5-i / O
Notes on development experience: TP5 exp query, SQL analysis, JQ, applet, right-click menu, Linux skills, shell skills, mysql, etc
The 360 mobile assistant on Huawei maimang 7 cannot be uninstalled
Replace jade engine with EJS
Logstash failed to create queue
PHP PNG to webp
Uni app subcontracting loading and optimization
In order to resist the flood, the soldiers have been fighting for 89 hours. How many days and hours are there in total?
On the use of regular expressions (bracket problem)
【Pycharm踩坑记录】配置远程运行后提示,[Errno 2] No such file or directory
Installing pytorch under Anaconda
JS - for cycle case: Horse grain
Wrap dynamically created child elements in dynamically created structures
Print an array clockwise
Paging query template of Oracle
Filebeat collects logs to elk