• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

js对接微信连wifi提示Uncaught SyntaxError: Unexpected token ILLEGAL

php 搞代码 4年前 (2022-01-25) 15次浏览 已收录 0个评论
文章目录[隐藏]
<code><script type="text/javascript">    /**</code>
    • 微信连Wi-Fi协议3.1供运营商portal呼起微信浏览器使用
      */

    1. loadIframe = null;

    2. noResponse = null;

    3. putNoResponse(ev){

      <code>      clearTimeout(noResponse); }       function errorJump()  {      alert('该浏览器不支持自动跳转微信请手动打开微信\n如果已跳转请忽略此提示');  }    myHandler = function(error) {      errorJump();  };    function createIframe(){      var iframe = document.createElement("iframe");      iframe.style.cssText = "display:none;width:0px;height:0px;";      document.body.appendChild(iframe);      loadIframe = iframe;  } //注册回调函数</code>
    4. jsonpCallback(result){

      <code>     if(result && result.success){         alert('WeChat will call up : ' + result.success + '  data:' + result.data);                         var ua=navigator.userAgent;                       if (ua.indexOf("iPhone") != -1 ||ua.indexOf("iPod")!=-1||ua.indexOf("iPad") != -1) {   //iPhone                          document.location = result.data;         }else{                          if('false'=='true'){                 alert('[强制]该浏览器不支持自动跳转微信请手动打开微信\n如果已跳转请忽略此提示');                 return;             }                          createIframe();             loadIframe.src=result.data;             noResponse = setTimeout(function(){                 errorJump();               },3000);         }                     }else if(result && !result.success){         alert(result.data);     } } </code>
    5. Wechat_GotoRedirect(appId, extend, timestamp, sign, shopId, authUrl, mac, ssid, bssid){

      <code>          //将回调函数名称带到服务器端     var url = "https://wifi.weixin.qq.com/operator/callWechatBrowser.xhtml?appId=" + appId </code>
      • “&extend=” + extend

      • “&timestamp=” + timestamp

      • “&sign=” + sign;

        <code>      //如果sign后面的参数有值,则是新3.1发起的流程   if(authUrl && shopId){              </code>
      1. = “https://wifi.weixin.qq.com/operator/callWechat.xhtml?appId=&#8221; + appId

        • “&extend=” + extend

        • “&timestamp=” + timestamp

        • “&sign=” + sign

        • “&shopId=” + shopId

        • “&authUrl=” + encodeURIComponent(authUrl)

        • “&mac=” + mac

        • “&ssid=” + ssid

        • “&bssid=” + bssid;

          <code>          }                  //通过dom操作创建script节点实现异步请求  </code>
      1. script = document.createElement(‘script’);

        <code>    script.setAttribute('src', url);      document.getElementsByTagName('head')[0].appendChild(script);}</code>

        </script>
        <link rel=”stylesheet” href=”https://wifi.weixin.qq.com/resources/css/style-simple-follow.css"/&gt;

        <body cl1本文来#源gaodai$ma#com搞$代*码*网

        搞代gaodaima码

        ass=”mod-simple-follow”>

        <code><div class="mod-simple-follow-page__img-shadow"></div><div class="mod-simple-follow-page__logo">        <p class="mod-simple-follow-page__logo-name"></p>    <p class="mod-simple-follow-page__logo-welcome">欢迎您</p></div></code>

        <code><p class="mod-simple-follow-page__attention-txt">欢迎使用微信连Wi-Fi</p>一键打开微信连Wi-Fi</code>

        <script type=”text/javascript”>

    1. callWechatBrowser(){

      <code>  Wechat_GotoRedirect('wxb069aeef0a797e59', 'demoNew', '<?php</code>
    1. getMillisecond() {
      list($t1, $t2) = explode(‘ ‘, microtime());

    2. (float)sprintf(‘%.0f’,(floatval($t1)+floatval($t2))*1000);
      }

    3. getMillisecond(); ?>’, ‘<?php echo md5($wxpwd.”+demoNew+”.getMillisecond().”+7360720+http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200+”.”ff:ff:ff:ff:ff:ff+ff:ff:ff:ff:ff:ff+”.$wxysid);?>’, ‘7360720’, ‘http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200&#8217;, ‘ff:ff:ff:ff:ff:ff’, ‘7360720’, ‘ff:ff:ff:ff:ff:ff’);
      }
      </script>

    <script type=”text/javascript”>

    <code>document.addEventListener('visibilitychange', putNoResponse, false);</code>

    </script>

    回复内容:

    <code><script type="text/javascript">    /**</code>
    • 微信连Wi-Fi协议3.1供运营商portal呼起微信浏览器使用
      */

    1. loadIframe = null;

    2. noResponse = null;

    3. putNoResponse(ev){

      <code>      clearTimeout(noResponse); }       function errorJump()  {      alert('该浏览器不支持自动跳转微信请手动打开微信\n如果已跳转请忽略此提示');  }    myHandler = function(error) {      errorJump();  };    function createIframe(){      var iframe = document.createElement("iframe");      iframe.style.cssText = "display:none;width:0px;height:0px;";      document.body.appendChild(iframe);      loadIframe = iframe;  } //注册回调函数</code>
    4. jsonpCallback(result){

      <code>     if(result && result.success){         alert('WeChat will call up : ' + result.success + '  data:' + result.data);                         var ua=navigator.userAgent;                       if (ua.indexOf("iPhone") != -1 ||ua.indexOf("iPod")!=-1||ua.indexOf("iPad") != -1) {   //iPhone                          document.location = result.data;         }else{                          if('false'=='true'){                 alert('[强制]该浏览器不支持自动跳转微信请手动打开微信\n如果已跳转请忽略此提示');                 return;             }                          createIframe();             loadIframe.src=result.data;             noResponse = setTimeout(function(){                 errorJump();               },3000);         }                     }else if(result && !result.success){         alert(result.data);     } } </code>
    5. Wechat_GotoRedirect(appId, extend, timestamp, sign, shopId, authUrl, mac, ssid, bssid){

      <code>          //将回调函数名称带到服务器端     var url = "https://wifi.weixin.qq.com/operator/callWechatBrowser.xhtml?appId=" + appId </code>
      • “&extend=” + extend

      • “&timestamp=” + timestamp

      • “&sign=” + sign;

        <code>      //如果sign后面的参数有值,则是新3.1发起的流程   if(authUrl && shopId){              </code>
      1. = “https://wifi.weixin.qq.com/operator/callWechat.xhtml?appId=&#8221; + appId

        • “&extend=” + extend

        • “&timestamp=” + timestamp

        • “&sign=” + sign

        • “&shopId=” + shopId

        • “&authUrl=” + encodeURIComponent(authUrl)

        • “&mac=” + mac

        • “&ssid=” + ssid

        • “&bssid=” + bssid;

          <code>          }                  //通过dom操作创建script节点实现异步请求  </code>
      1. script = document.createElement(‘script’);

        <code>    script.setAttribute('src', url);      document.getElementsByTagName('head')[0].appendChild(script);}</code>

        </script>
        <link rel=”stylesheet” href=”https://wifi.weixin.qq.com/resources/css/style-simple-follow.css"/&gt;

        <body class=”mod-simple-follow”>

        <code><div class="mod-simple-follow-page__img-shadow"></div><div class="mod-simple-follow-page__logo">        <p class="mod-simple-follow-page__logo-name"></p>    <p class="mod-simple-follow-page__logo-welcome">欢迎您</p></div></code>

        <code><p class="mod-simple-follow-page__attention-txt">欢迎使用微信连Wi-Fi</p>一键打开微信连Wi-Fi</code>

        <script type=”text/javascript”>

    1. callWechatBrowser(){

      <code>  Wechat_GotoRedirect('wxb069aeef0a797e59', 'demoNew', '<?php</code>
    1. getMillisecond() {
      list($t1, $t2) = explode(‘ ‘, microtime());

    2. (float)sprintf(‘%.0f’,(floatval($t1)+floatval($t2))*1000);
      }

    3. getMillisecond(); ?>’, ‘<?php echo md5($wxpwd.”+demoNew+”.getMillisecond().”+7360720+http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200+”.”ff:ff:ff:ff:ff:ff+ff:ff:ff:ff:ff:ff+”.$wxysid);?>’, ‘7360720’, ‘http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200&#8217;, ‘ff:ff:ff:ff:ff:ff’, ‘7360720’, ‘ff:ff:ff:ff:ff:ff’);
      }
      </script>

    <script type=”text/javascript”>

    <code>document.addEventListener('visibilitychange', putNoResponse, false);</code>

    </script>

    搞定了 谢谢


    搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
    转载请注明原文链接:js对接微信连wifi提示Uncaught SyntaxError: Unexpected token ILLEGAL

    喜欢 (0)
    [搞代码]
    分享 (0)
    发表我的评论
    取消评论

    表情 贴图 加粗 删除线 居中 斜体 签到

    Hi,您需要填写昵称和邮箱!

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址