123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <!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="format-detection" content="telephone=no">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <title>soodo上朵</title>
- <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <style>
- .dalog-618{position: fixed;width: 100%;height: 100%;left: 0;top: 0;background-color: rgba(0,0,0,.7);z-index:99;padding-top:35%;display: none;}
- .dalog-618>div{position: relative;width: 300px;height: 265px;margin: 0 auto; background: url(images/dalog-618.png) center center no-repeat;background-size: 100%;}
- .dalog-618 .btn-618{position: absolute;bottom: 18px;padding:10px 12px; width: 40%;left: 30%;background-color:#F1436C;color: #fff;border:0;border-radius: 0;}
- .dalog-618 .title{width:100px;margin:0 auto;color: #F1436C;text-align: center;padding:38px 0 24px 0;font-size: 22px;}
- .dalog-618 .msg{margin: 0 auto;text-align: center;width: 260px;color: #F1436C;font-size: 18px;}
- .dalog-618 .mui-icon-close{color: #F1436C;position: absolute;right: 10px;top: 10px;}
- </style>
- <script>
- //屏蔽分享
- </script>
- </head>
- <body>
- <div class="mui-content" style="padding-bottom: 50px;">
- <div class="vip-user-box">
- <div class="user-middle">
- <div class="user-head">
- <!--头像-->
- <img id="headDiv" src="images/tx-1.png" />
- <!--等级图标-->
- <!--<span class="user-leave"><img src="images/icon-vip-1.png" /></span>-->
- </div>
- <!--昵称-->
- <div class="user-name" id="userNickname" style="font-size: 20px;">name</div>
- <!--用户身份-->
- <!--<div class="userIdentity"></div>-->
- <p>让笑容停留在18岁</p>
- </div>
- </div>
- <div class="mui-content-padded" style="margin: 0 10px;">
- <ul class="mui-table-view my-list-618">
- <li class="mui-text-center">
- 已助力好友列表
- </li>
- <li class="mui-text-center">
- <h6>(共<span id="allCount">0</span>人,还需<span id="nextCount">0</span>人)</h6>
- </li>
- <!--<li class="mui-table-view-cell mui-media">
- <a href="javascript:;">
- <img class="mui-media-object mui-pull-left" src="images/tx-1.png">
- <div class="name-618">
- 木屋
- </div>
- <h6 class="date-618">2018-06-18 10:10</h6>
- </a>
- </li>
- <li class="mui-table-view-cell mui-media">
- <a href="javascript:;">
- <img class="mui-media-object mui-pull-left" src="images/tx-1.png">
- <div class="name-618">
- 木屋
- </div>
- <h6 class="date-618">2018-06-18 10:10</h6>
- </a>
- </li>
- <li class="mui-table-view-cell mui-media">
- <a href="javascript:;">
- <img class="mui-media-object mui-pull-left" src="images/tx-1.png">
- <div class="name-618">
- 木屋
- </div>
- <h6 class="date-618">2018-06-18 10:10</h6>
- </a>
- </li>-->
- </ul>
- </div>
- <!--<div class="mui-content-padded">
- <h4 class="mui-text-center">活动详情</h4>
- </div>-->
- <div class="mui-content-padded">
- <img width="100%" src="images/hd-618.jpg" />
- </div>
-
- </div>
- <footer class="mui-bar mui-bar-tab">
- <button type="button" class="btn-submit-618" style="display: none;"></button>
- </footer>
- <div class="dalog-618">
- <div>
- <div class="title">提示</div>
- <div class="msg">此活动仅限soodo上朵会员参与</div>
- <button type="button" class="btn-618">去购买</button>
- <span class="mui-icon mui-icon-close"></span>
- </div>
- </div>
- <!-- 加载ing -->
- <div class="loading covers">
- <div class="loading-bj"></div>
- <p>加载中...</p>
- </div>
- <!-- 加载ing END -->
- <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>
- window.addEventListener('pageshow', function(e) {
- // 通过persisted属性判断是否存在 BF Cache
- if(e.persisted) {
- location.reload();
- }
- });
-
- mui.ready(function() {
-
- mui.alert("活动已过期!", function() {
- location.href = "index.html?dates=" + new Date().getTime(); // 前往首页
- });
- return false;
-
- $.ajax(base_path + '/wechat/activity/to_activity?dates=' + new Date().getTime(), {
- data: {},// ajax参数 没有则不写
- dataType: 'json',
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- type: 'get',
- timeout: 15000,
- success: function(dt) {
- if(dt.isRedirect) {//先判断isRedirect,然后跳转redirectURL
- location.href = dt.redirectURL;
- } else {
- $("#headDiv").prop("src",dt.data.member.userHead);
- $("#userNickname").text(dt.data.member.userNickname);
- if(dt.status) {//判断接口返回状态status
- console.log(dt)
- if(dt.data.status==-1){
- $(".btn-submit-618").attr("name",dt.data.status).text("立即参加").show();
- $(".my-list-618").hide();
- }else if(dt.data.status==1){
- $(".btn-submit-618").attr("name",dt.data.status).text("查看二维码").show();
- }else if(dt.data.status==2){
- $(".btn-submit-618").attr("name",dt.data.status).text("领取刷头兑换券").show();
- }else if(dt.data.status==3){
- $(".btn-submit-618").text("已领取刷头兑换券").attr("disabled","disabled").show();
- }
- var table=document.body.querySelector(".my-list-618");
- mui.each(dt.data.activityHelpList, function() {
- var li=document.createElement("li");
- li.className='mui-table-view-cell mui-media';
- li.innerHTML='<a><img class="mui-media-object mui-pull-left" src="'+this.userHead+'"><div class="name-618">'+this.userNickname+'</div><h6 class="date-618">'+this.activityCreateTime+'</h6></a>';
- table.appendChild(li);
- });
- if(typeof(dt.data.activity)!="undefined"){
- $("#allCount").text(dt.data.activity.activityAlreadyHelp);
- $("#nextCount").text(dt.data.activity.activityAllHelp-dt.data.activity.activityAlreadyHelp);
- }
- } else {
- $(".dalog-618 .msg").text(dt.message);
- $(".dalog-618").show();
- }
- setTimeout(function(){
- fenxiang();
- $(".loading").hide();//隐藏loadilng
- },500);
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr);
- mui.alert("加载数据失败!网络错误");
- }
- });
-
- });
-
-
-
-
- //按钮事件
- $(document).on('tap', '.btn-submit-618', function() {
- var th=$(this);
- var src='';
- switch (th.attr("name")){
- case "-1":
- $.ajax(base_path+'/wechat/activity/participate_activity?dates=' + new Date().getTime(), {
- data: {},// ajax参数 没有则不写
- dataType: 'json',
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- type: 'get',
- timeout: 20000,
- success: function(dt) {
- if(dt.isRedirect) {//先判断isRedirect,然后跳转redirectURL
- location.href = dt.redirectURL;
- } else {
- if(dt.status) {//判断接口返回状态status
- //console.log(dt.data.imgPath);
- location.href='index-2018-618.html';
- } else {
- mui.alert(dt.message,function(){
- location.href="index-2018-618.html";
- });
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr);
- mui.alert("参加失败!网络错误");
- }
- });
- break;
- case "1":
- location.href='index-2018-618.html';
- break;
- case "2":
- location.href='cash-coupon-618.html';
- break;
- case "3":
- mui.alert("您已经领取过优惠券,请勿重复操作")
- break;
- default:
- break;
- }
-
- });
- $(document).on('tap', '.dalog-618 .mui-icon-close', function() {
- $(".dalog-618").hide();
- });
- $(document).on('tap', '.dalog-618 .btn-618', function() {
- location.href="pro-list.html";
- $(".dalog-618").hide();
- });
- //分享
- function fenxiang(){
- var src = location.href;
- window.wxFriend = {
- "appId": "",
- "imgUrl": 'https://s.iamberry.com/soodo/wechat/images/fenxiang-2018-0618.jpg',
- "link": src,
- "desc": '老会员免费领取刷头福利啦!',
- "title": '【soodo上朵】老会员免费领取刷头福利啦!',
- "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
- "shareTimeSuccess": "分享成功",
- "shareTimeCancel": "已取消分享",
- "shareAppSuccess": "分享成功!",
- "shareAppCancel": "已取消分享"
- };
- getConfig();
- }
- </script>
- </body>
- </html>
|