| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 | <!DOCTYPE html><html>  <head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">    <title>{$game_name}</title>    <link rel="stylesheet" href="__STATIC__/h5sdk/css/index.css?v={:config('js_version')}">    <!--apple-->    <meta name="apple-mobile-web-app-capable" content="yes">    <link rel="apple-touch-icon" href="{$game_icon}">  </head>  <body>    <iframe id="gameFrame" style="background: #000" name="gameFrame" class="fullscreen" src="{$play_url}"></iframe>    <input type="hidden" id="gameId" value="{$game_id}">    <input type="hidden" id="agentId" value="{$agent_id}">    <input type="hidden" id="siteName" value="{$site_info.site_name}">    <input type="hidden" id="siteQr" value="{$site_info.h5_wap_qr}">    <input type="hidden" id="siteLogo" value="{$site_info.h5_wap_logo}">    <input type="hidden" id="siteFloat" value="{$site_info.h5_wap_sdk_float}">    <input type="hidden" id="agentSite" value="{$agent_site}">    <input type="hidden" id="h5iSite" value="{$h5i_site}">    <input type="hidden" id="staticSite" value="{$static_site}">    <!--apple-->    <input type="hidden" id="gameIcon" value="{$game_icon}">    <input type="hidden" id="game_name" value="{$game_name}">    <input type="hidden" id="down_url" value="{$down_url|default=''}">    <script src="__STATIC__/h5sdk/js/huosdk.js?v={:config('js_version')}"></script>    <if condition="$userinfo.mem_id gt 0">      <script>        $(function () {          HuoFloat.init()        })        //监听刷新页面事件方法        window.onbeforeunload = function(event){          console.log(465456456465)        };        // 重写登录请求成功的回调事件        HuoApi.loginSuccess = function (res, username, password) {          if(res.code == 200){            // window.location.reload()            if (res.code === 200) {              document.getElementById('gameFrame').src = document.getElementById('gameFrame').src              try {                window.huo.setToken(res.data.user_token)              } catch (e) {                // console.log(e)              }              // 浮点配置              if (res.data.float_status === 2) {                HuoFloat.init()              }              // 移除弹框              HuoUtils.switchTemplate()              if(res.data.url != ''){                HuoUtils.createFrame({                  name: 'login_' + new Date().getTime(),                  close: false,                  style: 'background: transparent;z-index:99999999;',                  url: res.data.url                })              }            } else {              // 返回登录              HuoUtils.switchTemplate('login', {                'mem-username': username              })              HuoUtils.renderAccountList()              HuoUtils.tips(res.msg)            }            window.setTimeout(function () {              let cbData = {                status: res.code === 200 ? 2 : 1,                msg: res.msg              }              if (res.code === 200) {                cbData.mem_id = res.data.mem_id                cbData.user_token = res.data.cp_user_token                /*HuoApi.userDetail({                  game_id: HuoConfig.APPID                })*/              }else{                HuoUtils.tips(res.msg)              }              if (HuoSdk.callback.login) {                HuoSdk.callback.login(cbData)              } else {                HuoConfig.gameFrame.postMessage({                  type: 'callback.login',                  value: cbData                }, '*')              }            }, 200)          }else{            HuoUtils.switchTemplate('login', {              'mem-username': username            })            HuoUtils.tips(res.msg)          }        }      </script>    </if>       <script>        // iOS设备添加到主屏幕        if (!isStandalone() && !!isIos()) {          $('body').append(bindDesktopTemplate)          HuoUtils.switchTemplate('bindDesktop')        }        function isIos() {          return /i(pad|phone|pod)/i.test(navigator.userAgent);        }        function isStandalone() {          return navigator.standalone || (window.matchMedia('(display-mode: standalone)').matches);        }    </script>  </body></html>
 |