| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> |
| | | <title>首页</title> |
| | | <link rel="shortcut icon" href=./favicon.ico type=image/x-icon> |
| | | <link href="static/css/public1.css" rel="stylesheet"> |
| | | <script type="text/javascript"> |
| | | // 设置跟元素字体 |
| | | document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px' |
| | | // var styleName = window.localStorage.getItem('styleName') |
| | | // if(styleName == 'black'){ |
| | | // document.getElementsByTagName('body')[0].className = 'black-bg' |
| | | // }else{ |
| | | // document.getElementsByTagName('body')[0].className = 'red-bg' |
| | | // } |
| | | //步骤一:创建异步对象 |
| | | var ajax = new XMLHttpRequest() |
| | | //步骤二:设置请求的url参数,参数一是请求的类型,参数二是请求的url,可以带参数,动态的传递参数starName到服务端 |
| | | ajax.open('get', 'http://192.168.10.12:8091/api/site/getInfo.do') |
| | | //步骤三:发送请求 |
| | | ajax.send() |
| | | //步骤四:注册事件 onreadystatechange 状态改变就会调用 |
| | | ajax.onreadystatechange = function () { |
| | | if (ajax.readyState == 4 && ajax.status == 200) { |
| | | //步骤五 如果能够进到这个判断 说明 数据 完美的回来了,并且请求的页面是存在的 |
| | | // console.log(JSON.parse(ajax.responseText).data);//输入相应的内容 |
| | | var styleName = JSON.parse(ajax.responseText).data.siteColor |
| | | // var styleName = window.localStorage.getItem('styleName') |
| | | if (styleName == 'black') { |
| | | window.localStorage.setItem('styleName', 'black') |
| | | document.getElementsByTagName('body')[0].className = 'black-bg' |
| | | } else if (styleName == 'yellow') { |
| | | window.localStorage.setItem('styleName', 'red') |
| | | document.getElementsByTagName('body')[0].className = 'yellow-bg' |
| | | } else { |
| | | window.localStorage.setItem('styleName', 'red') |
| | | document.getElementsByTagName('body')[0].className = 'red-bg' |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" |
| | | content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | <title>首页</title> |
| | | <link rel="shortcut icon" href=./favicon.ico type=image/x-icon> |
| | | <link href="static/css/public1.css" rel="stylesheet"> |
| | | <link href="//at.alicdn.com/t/c/font_4480663_5e9rjcl352x.css" rel="stylesheet"> |
| | | |
| | | <script> |
| | | // 禁用缩放 |
| | | function addMeta() { |
| | | // $('head').append('<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />'); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | setTimeout(addMeta, 3000); |
| | | |
| | | // 禁用双指放大 |
| | | document.documentElement.addEventListener('touchstart', function (event) { |
| | | if (event.touches.length > 1) { |
| | | event.preventDefault(); |
| | | } |
| | | }, { |
| | | passive: false |
| | | }); |
| | | |
| | | // 禁用双击放大 |
| | | var lastTouchEnd = 0; |
| | | document.documentElement.addEventListener('touchend', function (event) { |
| | | var now = Date.now(); |
| | | if (now - lastTouchEnd <= 300) { |
| | | event.preventDefault(); |
| | | } |
| | | lastTouchEnd = now; |
| | | }, { |
| | | passive: false |
| | | }); |
| | | </script> |
| | | |
| | | <!-- Start of LiveChat (www.livechat.com) code --> |
| | | <script> |
| | | window.__lc = window.__lc || {}; |
| | | window.__lc.license = 17714604; |
| | | ; (function (n, t, c) { function i(n) { return e._h ? e._h.apply(null, n) : e._q.push(n) } var e = { _q: [], _h: null, _v: "2.0", on: function () { i(["on", c.call(arguments)]) }, once: function () { i(["once", c.call(arguments)]) }, off: function () { i(["off", c.call(arguments)]) }, get: function () { if (!e._h) throw new Error("[LiveChatWidget] You can't use getters before load."); return i(["get", c.call(arguments)]) }, call: function () { i(["call", c.call(arguments)]) }, init: function () { var n = t.createElement("script"); n.async = !0, n.type = "text/javascript", n.src = "https://cdn.livechatinc.com/tracking.js", t.head.appendChild(n) } }; !n.__lc.asyncInit && e.init(), n.LiveChatWidget = n.LiveChatWidget || e }(window, document, [].slice)) |
| | | </script> |
| | | <noscript><a href="https://www.livechat.com/chat-with/17714604/" rel="nofollow">Chat with us</a>, powered by <a |
| | | href="https://www.livechat.com/?welcome" rel="noopener nofollow" target="_blank">LiveChat</a></noscript> |
| | | <!-- End of LiveChat code --> |
| | | |
| | | </head> |
| | | |
| | | <body style="height: 100%; position: absolute; width: 100%;"> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | </html> |
| | | |
| | | </html> |