123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no">
- <title>分享领红包</title>
- <link rel="stylesheet" type="text/css" href="public/public_css.css"/>
- <style type="text/css">
- body,html{font-size: 0.16rem;height: 100vh;}
- body, div, button, h3, h6, span, ul, li, p, a,input{font-family: -apple-system,SF UI Text,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0; margin: 0; box-sizing: inherit; font-weight: normal;}
- .success{margin: auto;text-align: center;border-bottom:0.005rem solid #707070;}
- .success p:nth-child(1){font-size: 0.18rem;color: #FB3D38;padding-top: 0.86rem;padding-bottom: 0.145rem;}
- .success p:nth-child(2){font-size: 0.12rem;color: #FB3D38;padding-bottom: 0.655rem;}
- .success p:nth-child(4){font-size: 0.14rem;color: #666666;padding-top: 0.215rem;padding-bottom: 0.595rem;}
- #share{width: 0.94rem;height: 0.26rem;margin:auto;color:#FFF;font-size:0.15rem;line-height: 0.26rem;text-align:center;background:#FB3D38;border-radius:0.075rem;box-shadow:0.02rem 0.045rem 0.05rem rgba(143,141,141,0.22);}
- .download{}
- .download .tit{color:#3333333;font-size:0.18rem;text-align: center;padding-top: 0.62rem;padding-bottom: 0.455rem;}
- .download .leidou{padding-left: 0.16rem;padding-right: 0.15rem;}
- .download .leidou .liedouImg{width: 0.525rem;float: left;}
- .download .leidou .introduce{float: left;padding-left: 0.055rem;}
- .download .leidou .introduce span{width:1.36rem;font-size: 0.13rem;color: #333333;}
- .download .leidou .introduce img{width: 0.8rem;height: 0.195rem;padding-top: 0.06rem;padding-bottom: 0.1rem;}
- .download .leidou .down{float: right;width: 0.755rem;height: 0.23rem;color: #fff;font-size: 0.13rem;line-height: 0.24rem;margin-top: 0.28rem;text-align: center;background: #FB3D38;border-radius: 0.075rem;box-shadow: 0.02rem 0.045rem 0.05rem rgba(143,141,141,0.22);}
- .btom{clear: both;width: 100%;margin:auto;color:#FB3D38;font-size:0.14rem;text-align:center;padding-top: 0.5rem;padding-bottom: 0.56rem;}
- .shareMask{display: none;width: 100%;height: 100%;background: rgba(0,0,0,0.5036);position: absolute;top: 0;left: 0;}
- button{
- outline: none;
- }
- a, a:visited{
- text-decoration: none;
- }
- body{
- width: 100%;
- height: 100%;
- }
- .shareMask{
- display: none;
- width: 100%;
- height: 100%;
- background: rgba(0,0,0,0.5036);
- position: absolute;
- top: 0;
- left: 0;
- }
- .weixin{
- position: fixed;
- bottom: 0;
- background: #ffffff;
- width: 100%;
- }
- .weixins{
- background: rgba(216,216,216,0.2);
- width: 100%;
- display: -webkit-flex;
- display: -webkit-box;
- display: -moz-box;
- display: -ms-flexbox;
- display: flex;
- justify-content: space-around;
- }
- .weixins div{
- text-align: center;
- }
- .weixins div img{
- display: block;
- width: 0.44rem;
- height: 0.44rem;
- margin: auto;
- margin-top: 0.22rem;
- margin-bottom: 0.12rem;
- }
- .weixins div span{
- font-size: 0.12rem;
- line-height: 0.17rem;
- color: #555555;
- margin-bottom: 0.16rem;
- display: inline-block;
- }
- .cancel{
- line-height: 0.4rem;
- font-size: 0.15rem;
- color: #555555;
- text-align: center;
- }
- </style>
- <script type="text/javascript">
- document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
- window.onresize = function(){
- document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
- }
- </script>
- </head>
- <body>
- <div class="success">
- <p>恭喜你,已复制淘口令</p>
- <p>请前往淘宝领取红包</p>
- <p id="share">分享</p>
- <p>分享给朋友,有奖一起分</p>
- </div>
- <div class="download">
- <p class="tit">获取更多大额红包,下载猎豆优选</p>
- <div class="leidou">
- <img src="images/liedou.png" class="liedouImg"/>
- <p class="introduce"><img src="images/logo.png" alt="" /><span>购物先领券,下单赚佣金</span></p>
- <a class="down" href="http://a.app.qq.com/o/simple.jsp?pkgname=com.kuxuan.coupon_liedou">下载APP</a>
- </div>
- </div>
- <div class="btom">在淘宝/天猫购物之前,先来“猎豆优选App”</div>
-
- <div class="shareMask">
- <div class="weixin">
- <div class="weixins">
- <div class="weixinShare" onclick="shareWeixin()">
- <img src="../H5/weixin.png" />
- <span>微信</span>
- </div>
- <div class="pengyouquan" onclick="sharePengyouquan()">
- <img src="../H5/weixinQuan.png"/>
- <span>朋友圈</span>
- </div>
- </div>
- <div class="cancel">取消分享</div>
- </div>
- </div>
- </body>
- </html>
- <script type="text/javascript" src="public/jquery-2.1.0.js"></script>
- <script type="text/javascript">
- var userId = null;
- var activity_id = null;
- var share_code = null;
- var str=location.href; //取得整个地址栏
- var num=str.indexOf("?");
- str=str.substr(num+1); //str得到?之后的字符串
- var brr=str.split("&");
- for(var i = 0 ; i<brr.length; i++){
- if(brr[i].indexOf('userId') != -1){
- userId = brr[i].split('=')[1];//用户id
- localStorage.setItem('userId', userId);
- }
- if(brr[i].indexOf('activity_id') != -1){
- activity_id = brr[i].split('=')[1];//活动id
- localStorage.setItem('activity_id', activity_id);
- }
- if(brr[i].indexOf('share_code') != -1){
- share_code = brr[i].split('=')[1];
- }
- }
-
-
- $(".shareMask").click(function(e){
- $(".shareMask").css('display','none')
- })
-
- $(".weixins").click(function(e){
- e.preventDefault();
- return false
- })
-
-
- var jsons = {
- title:'@你,快来瓜分10000个红包!',
- desc:'福利放送!淘宝无门槛购物红包天天领!来看看你的手气~',
- url:'http://mzb.quyaqu.com/share/index.html?userId=' + userId
- };
- jsons = JSON.stringify(jsons);
- function shareWeixin () {
- if(navigator.userAgent.indexOf('Android') != -1){
- messageHandlers.shareWithWechatSession(jsons)
- }else{
- window.webkit.messageHandlers.shareWithWechatSession.postMessage(jsons)
- }
- }
-
- function sharePengyouquan () {
- if(navigator.userAgent.indexOf('Android') != -1){
- messageHandlers.shareWithWechatTimeline(jsons)
- }else{
- window.webkit.messageHandlers.shareWithWechatTimeline.postMessage(jsons)
- }
- }
-
- $("#share").click(function () {
- $(".shareMask").css('display','block')
- share();
- })
- $(".cancel").click(function () {
- $(".shareMask").css('display','none')
- })
-
- var num = 0;
- //分享
- function share() {
- $.ajax({
- type:"post",
- url:"/api/V2/share",
- data:{
- type:1,
- count: num
- },
- success: function (res) {
- var data =JSON.parse(res)
- num = data.res.count;
- }
- })
- }
- </script>
|