123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
- <meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Expires" content="0" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=8">
- <meta http-equiv="Cache" content="no-cache">
- <title>soodo上朵-年货节</title>
- <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
- <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <style>
- .color_a {color: #000000;}
- .color_a:hover {color: #000000;}
- .dalog {position: fixed;left: 0;top: 0;bottom: 0;right: 0;background: rgba(0, 0, 0, .7);display: none;z-index: 99;}
- .dalog>div {position: absolute;width: 270px;height: 290px;left: 50%;margin-left: -135px;top: 50%;margin-top: -150px;text-align: center;}
- .dalog ul{padding-top: 12px;}
- .dalog ol{width: 185px;display: block;margin: 0 auto;text-align: left;padding-bottom: 4px;}
- .dalog ol>li{font-size: 12px;margin:0;white-space: nowrap;}
- .dalog ul>li {margin:0 0 16px 0;color: #727171;}
- .dalog ul>li:last-child{margin-bottom: 10px;}
- .dalog ul li p {color: #666;}
- .dalog .btn-see-integral {border-radius: 25px;background: #727171;color: #fff;padding: 5px 22px;border: 0;font-size: 14px;}
- .dalog .icon-guanbicha {color: #fff;font-size: 26px;}
- .dalog strong {font-size: 22px;letter-spacing: 4px;}
- .dalog .icon-A-zhucewancheng {font-size: 40px;}
-
- .mui-content{background: url(images/20200103/20200103_back.jpg);background-size: 100%; background-repeat:no-repeat;}
- .helping_people{height: 40px;margin: 0 auto;width: 70%;margin-top: 20px;}
- .helping_people>ul>li{float: left;background: url(images/20200103/20200103_head_back.png);background-size: 99%; background-repeat:no-repeat; margin-left: 5%;width: 14%;height: 40px;display: block;}
- .helping_people>ul>li>img{border-radius: 50%; width: 100%;height: 40px;}
- .dalog_layer{background: url(images/20200103/20200103_tc_back.png);background-size: 100%; background-repeat:no-repeat;}
-
- .mui-text-center{padding-top: 210px;margin: 0 auto;width: 73%;}
- .active_rule>p{font-size: 12px;padding-left: 8px;padding-right: 8px;}
- </style>
- </head>
- <script>
- // var start = new Date(2019,12-1,10,00,00,00);
- // var end = new Date(2019,12-1,20,23,59,59);
- // var d = new Date().getTime(); //当前时间戳
- // if (d > start && d <= end) {
- // location.href = "index-2019-12-12.html?dates="+new Date().getTime();
- // }
- </script>
- <body>
- <div class="mui-content" style="height: 550px;">
- <div style="height: 45%;"></div>
- <div style="margin-left: 20px;font-size: 12px;color:#989898">已有<span class="help_people">0</span>位好友获得<span style="color:#EE5F71;background-color: #FFF3F3;">刷头9折券</span></div>
-
- <div class="helping_people help_people_show_01">
- <ul>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
- </div>
-
- <div class="helping_people help_people_show_02">
- <ul>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
- </div>
-
- <div class="fx_class" style="width: 60%;margin: 0 auto;padding-top: 20px;"><img src="images/20200103/20200103_fx.png" style="width: 100%;" alt=""></div>
- <div class="go_to_coupon" style="width: 60%;margin: 0 auto;padding-top: 12px;"><img src="images/20200103/20200103_to_coupon.png" style="width: 100%;" alt=""></div>
- </div>
-
- <div>
- <img src="images/20200103/20200103_active.jpg" alt="" style="width: 94%; margin: 0 3% 3% 3%;">
- </div>
-
- <!-- <div class="active_rule" style="width: 93%; margin: 0 auto; border: 0.5px solid #CCCCCC;border-style:dashed;margin-bottom: 20px;">
- <p style="padding-top: 5px; font-weight: bold;">活动规则:</p>
- <p>1.分享给1位朋友并且领取刷头优惠券,即可获得电动牙刷8折优惠券</p>
- <p>2.分享给3位朋友并且领取刷头优惠券,则刷头优惠券变为8.5折</p>
- <p>3.分享给5位朋友并且领取刷头优惠券,则刷头优惠券变为8折</p>
- <p>4.分享给10位朋友并且领取刷头优惠券,则刷头优惠券变为7.5折</p>
- <p>注:优惠券数量不累计,根据分享的完成度,保留最新的优惠券</p>
- </div> -->
- <div class="loading covers">
- <div class="loading-bj"></div>
- <p>正在加载...</p>
- </div>
-
-
- <div class="dalog">
- <div class="dalog_layer">
- <div class="mui-text-center get_coupon_id">
- <img src="images/20200103/20200103_tc_re.png" alt="" style="width: 100%;">
- </div>
- </div>
- </div>
-
- <div class="share-dalog">
- <img src="images/share.png" />
- </div>
-
- <script src="js/mui.min.js"></script>
- <script src="js/jquery-2.1.1.min.js"></script>
- <script src="js/main.js"></script>
- <script src="js/wechat-utils-1.0.js"></script>
- <script>
-
- var openid = getParam("openid"); //opendId
- var useropenid = getParam("useropenid"); //useropenid
-
- //ready事件
- mui.ready(function() {
-
- //刷新用户信息
- refreshUserInfo();
-
- if(!isEmpty(openid)){
- openid = "X";
- }
-
- //查询是否参与活动
- $.ajax(base_path + '/wechat/festival/to_festival?dates=' + new Date().getTime(), {
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- success: function(dt) {
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }
- if(dt.data.status == 2){
- //弹窗领取优惠券
- $('.dalog').show();
- }else{
- $('.dalog').hide();
- $('.help_people').text(dt.data.festivalHelpList.length);
- for(let i=0;i<dt.data.festivalHelpList.length;i++){
- var festivalHelp = dt.data.festivalHelpList[i];
- if(i < 5){
- $('.help_people_show_01').find('li').eq(i).html('<img src="'+ festivalHelp.userHead +'" style="width: 100%;" alt="">');
- }else{
- $('.help_people_show_02').find('li').eq(i-5).html('<img src="'+ festivalHelp.userHead +'" style="width: 100%;" alt="">');
- }
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr)
- }
- });
-
- $(".loading").hide().css("opacity", "0"); //隐藏(正在加载...).
-
- //设置分享
- fenxiang();
- });
-
- //领取优惠券
- $(document).on('tap', '.get_coupon_id', function() {
- if(!isEmpty(openid)){
- mui.toast("链接出错,请重试");
- }
- $.ajax(base_path + '/wechat/festival/receive_activity?dates=' + new Date().getTime(), {
- data:{
- openid:openid
- },
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- success: function(dt) {
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }
- if(dt.status){
- //弹窗领取优惠券
- location.reload();
- }else{
- mui.alert(dt.message);
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr)
- }
- });
- });
-
- //更新用户信息
- function refreshUserInfo(){
- $.ajax(base_path + '/wechat/getUserInfo?dates=' + new Date().getTime(), {
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- success: function(dt) {
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }
- if(!isEmpty(useropenid)){
- useropenid = dt.data.openId;
- location.href="cash-coupon-2019.html?openid="+openid+"&useropenid="+useropenid;
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr)
- }
- });
- }
-
- //分享
- function fenxiang(){
- var src = "https://s.iamberry.com/soodo/wechat/cash-coupon-2019.html?openid="+useropenid;
- window.wxFriend = {
- "appId": "",
- "imgUrl": 'https://s.iamberry.com/soodo/wechat/images/product_fenxiang.jpg',
- "link": src,
- "desc": '点击领取9折优惠券',
- "title": 'soodo上朵 | 你的好友邀请你领取优惠券',
- "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
- "shareTimeSuccess": "分享成功",
- "shareTimeCancel": "已取消分享",
- "shareAppSuccess": "分享成功!",
- "shareAppCancel": "已取消分享"
- };
- getConfig();
- }
-
- //分享弹窗
- $(document).on('tap', '.fx_class', function() {
- $(".share-dalog").show();
- });
- //关闭分享弹窗
- $(document).on('tap', '.share-dalog', function() {
- $(this).hide();
- });
-
- //去优惠券
- $(document).on('tap', '.go_to_coupon', function() {
- location.href="coupon_list.html";
- });
- </script>
- </body>
- </html>
|