123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
- <title>分享领红包</title>
- <link rel="stylesheet" type="text/css" href="public/public_css.css"/>
- <style type="text/css">
- body{ min-height:100vh;}
- .banner{width: 3.025rem;height: 1.15rem;margin: auto;padding-top: 0.11rem;}
- .banner img{width: 100%;}
- .red_packet{margin: auto;}
- .red_packet .click{font-size:0.18rem;color:#FB3D38;text-align: center;padding-top: 0.2rem;padding-bottom: 0.2rem;}
- .red_packet .copy{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);}
- .red_packet .con{font-size:0.14rem;color:#666666;padding-top: 0.2rem;padding-bottom: 0.345rem;text-align: center;}
- .already{height: 2rem;padding-left: 0.16rem;padding-right: 0.15rem;}
- .already .num{font-size:0.15rem;color:#FB3D38;padding-bottom: 0.175rem;}
- .already ul{height: 1.305rem;overflow-x:hidden;overflow-y: scroll;}
- .already ul li{float: left;padding-bottom: 0.08rem;color: #666666;line-height: 0.355rem;}
- .already ul li img{float: left;display: block;width: 0.355rem;height: 0.355rem;border:0;}
- .already ul li .username{ display: inline-block; float: left;padding-left: 0.075rem;width: 1.1rem;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
- .already ul li .ed{padding-right: 0.48rem;}
- .already ul li .username,.already ul li .ed{font-size: 0.14rem;}
- .already ul li .day,.already ul li .time{font-size: 0.12rem;}
- .already ul li .day{padding-right:0.08rem ;}
- .cooperation{width:2.54rem;height: 0.46rem;margin: auto;background: url(images/add.png) no-repeat 0.6rem 0.125rem,url(images/add.png) no-repeat 1.65rem 0.125rem; background-size:0.22rem 0.22rem ;}
- .cooperation img{float:left;width: 0.46rem;margin-right: 0.57rem;}
- .cooperation img:nth-child(3){margin-right: 0rem;}
- .bottom{margin: auto;color: #FB3D38;text-align: center;font-size: 0.14rem;}
- .bottom p:nth-child(1){padding-top: 0.185rem;padding-bottom: 0.205rem;font-size: 0.15rem;}
- .alert-info {position: absolute;top: 1.74rem;right: 0;left: 0;bottom: 0;text-align: center;}
- .alert-info p {display: inline-block;color: #fff;font-size: 0.14rem;line-height: 0.38rem;padding: 0 0.10rem;background-color: rgba(0, 0, 0, 0.7);border-radius: 5px;}
- .roll-wrap{height:1.305rem;overflow:hidden;}
- </style>
- <link rel="stylesheet" type="text/css" href="./index.css?v=6"/>
- <script type="text/javascript" src="../api-url.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
- <script src="js/weChatShare.js?v=9"></script>
- <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 id="index">
- <div class="banner">
- <img src="images/banner.png"/>
- </div>
- <div class="red_packet">
- <p>分享给好友后即可领取红包</p>
- <p class="copy shareHongbao">立即分享</p>
- </div>
- <div class="already">
- <p class="num"></p>
- <div class="roll-wrap" id="roll-wrap">
- <ul></ul>
- </div>
- </div>
- <div class="cooperation">
- <img src="https://adminsuishouji.oss-cn-beijing.aliyuncs.com/qianduologo.png" alt="" />
- <img src="images/taobao.png" alt="" />
- <img src="images/liedou.png" alt="" />
- </div>
- <div class="bottom">
- <p>联合送礼</p>
- <p>下载猎豆优选,大额红包拿到手软</p>
- </div>
- </div>
-
- <!--页面2-->
- <div id="invitation">
- <div class="success">
- <p class="shareSuccess">恭喜你,分享成功</p>
- <p class="copyTkl">点击下方复制淘口令,打开手机淘宝领取红包</p>
- <button class="share shareCopy" style="margin-bottom:0.4rem">一键复制</button>
- </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>
- <div class="down">
- <div onclick="downApp()">下载APP</div>
- <span>邀请码:666</span>
-
- </div>
- </div>
- </div>
- <div class="btom">在淘宝/天猫购物之前,先来“猎豆优选App”</div>
- </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>
-
- <div class="shareWechat">
- <img src="./images/wx_jiantou.png" class="wx_jiantou" />
- <div class="shareWechatCon">
- <h3>分享给朋友/群聊</h3>
- <p>分享后即可领取红包</p>
- <img class="cancel" src="./images/close.png"></img>
- </div>
- </div>
-
- <input id="copy_1" type="text" readOnly="true" value=""/>
- <div id="copy_2"></div>
- <text id="taokouling">€1Itabeg9EZP€</text>
-
- <div class="alert-info" style="display: none;">
- <!-- tip提示,3s后消失 -->
- <p></p>
- </div>
- </body>
- </html>
- <script type="text/javascript" src="public/jquery-2.1.0.js"></script>
- <script type="text/javascript">
- var user_id = 1;
- //页面加载,显示数据
- window.onload = function () {
- Lead() ;
- }
- //领红包
- function collarRed() {
- $.ajax({
- type:"post",
- url:"/api/V2/receiveRedPacket",
- data:{
- user_id:user_id
- },
- success: function (res) {
- var data =JSON.parse(res)
- console.log(data)
- if(data.code == 0){
- window.location.href = 'Invitation.html'
- }else if(data.code == 4003){
- console.log("领取失败")
- }
- }
- })
- }
- //已领红包
- function Lead() {
- $.ajax({
- type:"post",
- url:"/api/V2/returnRedPacket",
- success: function (res) {
- var data =JSON.parse(res)
- // console.log(data)
- if(data.code == 0){
- var dataArr = data.res.list,html = '',numHtml = '', name = '' , img = '';
- numHtml +='已有'+ data.res.count +'位用户领取红包';
- dataArr.forEach(function (item, index) {
- if(item.user_name){
- name = item.user_name;
- }else{
- name = '匿名';
- }
- if(item.user_img){
- img = item.user_img;
- }else{
- img = 'images/moren.png'
- }
- html += '<li><img src='+ img +' /><span class="username">'+ name +'</span><span class="ed">领取了红包</span><span class="day">'+ item.received_time +'</span></li>'
- })
- $('.num').html(numHtml);
- $('.roll-wrap ul').html(html)
- }
- new scrollTxt().init();
- }
- })
- }
-
-
- function scrollTxt(){
- var controls={},
- values={},
- t1=200, /*播放动画的时间*/
- t2=1500, /*播放时间间隔*/
- si;
- controls.rollWrap=$("#roll-wrap");
- controls.rollWrapUl=controls.rollWrap.children();
- controls.rollWrapLIs=controls.rollWrapUl.children();
- values.liNums=controls.rollWrapLIs.length;
- values.liHeight=controls.rollWrapLIs.eq(0).height();
- values.ulHeight=controls.rollWrap.height();
- this.init=function(){
- autoPlay();
- // pausePlay();
- }
- /*滚动*/
- function play(){
- controls.rollWrapUl.animate({"margin-top" : "-"+values.liHeight}, t1, function(){
- $(this).css("margin-top" , "0").children().eq(0).appendTo($(this));
- });
- }
- /*自动滚动*/
- function autoPlay(){
- /*如果所有li标签的高度和大于.roll-wrap的高度则滚动*/
- if(values.liHeight*values.liNums > values.ulHeight){
- si=setInterval(function(){
- play();
- },t2);
- }
- }
- /*鼠标经过ul时暂停滚动*/
- function pausePlay(){
- controls.rollWrapUl.on({
- "mouseenter":function(){
- clearInterval(si);
- }
- ,
- "mouseleave":function(){
- autoPlay();
- }
- });
- }
- }
-
-
- </script>
- <script type="text/javascript" src="js/index.js?v=3"></script>
- <script type="text/javascript" src="js/invitation.js?v=10"></script>
|