detail.html 7.08 KB
Newer Older
章建武's avatar
章建武 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0 ,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <title>2018时尚天河“十佳商铺”网络评选</title>
        <script>
                function setRootSize(){
                    var docWid = window.document.documentElement,
                        width = docWid.getBoundingClientRect().width,
                        fontSize = (width >= 450) ? (450 / 7.5) : width / 750 * 100;
                        docWid.style.fontSize = fontSize + 'px';
                }
                window.addEventListener('resize', function() {
                    setRootSize();
                }, false);
                setRootSize();
                var host="https://vote.guoguodz.com/";
        </script>
        <script src="../dist/script/authorize.js"></script>
        <link rel="stylesheet" type="text/css" href="../dist/style/initial.css" />
        <link rel="stylesheet" type="text/css" href="../dist/style/detail.css" />
    </head>
    <body>
          <a href="./index.html" class="to-index">首页</a>
          <a href="javascript:void(0)" class="check-rule">规则</a>
          <a href="javascript:void(0)" class="to-share">点这里分享朋友圈</a>
          <div class="wrap">
               <p class="thum">
                   <img src=""/>
                   <i class="loading"></i>
               </p>
               <div class="info">
                     <p>商铺:</p>
                     <p>编号:</p>
                     <p>店铺地址:</p>
               </div>
               <div class="vote-info">
               </div>
          </div>
          <p class="to-vote">投我一票<span class="and-one">+1</span></p>
          <div class="rule-wrap">
               <a href="javascript:void(0)" class="close-rule">关闭</a>
               <div class="rule">
                   <h1>活动规则</h1>
                   <h2>一、投票时间:2018年10月13日 至 2018年10月18日止。</h2>
                   <h2>二、投票规则:每类“十佳商铺”投票人每人每天可投2票,每天可投同一商铺一票(每个微信ID限投12票)。</h2>
                   <h2>三、投票方法:</h2>
                   <h3>1、在投票活动页中选择您准备投票的商铺(或输入编号、商铺名称搜索),您可以点击“投票”按钮直接投票。<br/>
                       也可以或进入该商铺详情页面,点击“投票”参与投票。投票后,提示票数+1,说明您已为该商铺成功投票。</h3>
                   <h3>2、您可以点击商铺详情页面中右上角按钮,分享朋友圈,让更多的朋友来为喜欢的选手投上一票。</h3>
                   <h2>四、投票说明:</h2>
                   <h3>1、本次活动本着公平、公正、公开的原则,投票形式采用手机微信网络投票方式,以最后得票数排名为晋级标准。</h3>
                   <h3>2、特别提醒:系统具有先进的投票日志分析系统和报警系统,如一量发现刷票行为,将取消为无效投票,情节严重者,将取消参与资格。</h3>
                   <h2>五、活动主办方:时尚天河,活动最终解释权归时尚天河商业广场所有。</h2>
               </div>
          </div>

          <div class="tip">
               <span></span>
          </div>

          <script src="../dist/script/detail.js"></script>
          <!--微信分享-->
          <script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
          <script>
                 function GetQueryString(name)
                 {
                     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
                     var r = window.location.search.substr(1).match(reg);
                     if(r!=null)return  unescape(r[2]); return null;
                 }
                 var url = "https://vote.guoguodz.com/vote/html/detail.html?uflag="+GetQueryString("uflag");
                 function getAppId(){
                    return new Promise(function(resolve,reject){
                        var xmlhttp = new XMLHttpRequest();
                        xmlhttp.onreadystatechange=function(){
                          if (xmlhttp.readyState==4 && xmlhttp.status==200)
                          {
                             resolve(JSON.parse(xmlhttp.responseText));
                          }
                        }
                        xmlhttp.open("POST",host+"vote.php/Index/getShare",true);
                        xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
                        xmlhttp.send(`url=${encodeURIComponent(location.href)}`);
                    });
                 }
                 
                 getAppId().then(function(res){
                     wx.config({
                        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                        appId: res.data.appId, // 必填,公众号的唯一标识
                        timestamp: res.data.timestamp, // 必填,生成签名的时间戳
                        nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
                        signature: res.data.signature,// 必填,签名,见附录1
                        jsApiList: ["onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","onMenuShareQZone","hideMenuItems"] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
                     });
                 },function(data){
                     throw new Error(data);
                 })


                 var shareConfig={
                    title: '2018时尚天河“十佳商铺”网络评选,等你来投票~', // 分享标题
                    desc: '2018时尚天河“十佳商铺”网络评选,等你来投票~', // 分享描述
                    link: url,// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                    imgUrl: 'https://vote.guoguodz.com/vote/dist/images/share.png', // 分享图标
                    success: function () { 
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () { 
                        // 用户取消分享后执行的回调函数
                    }
                 }
                 wx.ready(function(){
                    wx.onMenuShareTimeline(shareConfig);
                    wx.onMenuShareAppMessage(shareConfig);
                    wx.onMenuShareQQ(shareConfig);
                    wx.onMenuShareWeibo(shareConfig);
                    wx.onMenuShareQZone(shareConfig);
                    wx.onMenuShareTimeline(shareConfig);
                 });


          </script>
    </body>
</html>