index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="force-rendering" content="webkit"/>
  6. <meta name="renderer" content="webkit" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,minimum-scale=1.0">
  9. <title>功道云-积分系统用户登录</title>
  10. <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  11. <script type="text/javascript" src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
  12. <script src="static/js/polyfill.min.js"></script>
  13. <!-- <script>
  14. /**
  15. * wx.config 参数
  16. *
  17. * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90547
  18. */
  19. window.configParams = { /* ... */ }
  20. /**
  21. * wx.agentConfig 参数
  22. *
  23. * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90548
  24. */
  25. window.agentConfigParams = { /* ... */ }
  26. </script> -->
  27. <style>
  28. .chromLink {
  29. width: 163px;
  30. height: 66px;
  31. position: absolute;
  32. left: 50%;
  33. top: 450px;
  34. margin-left: -170px;
  35. cursor: pointer;
  36. background-color: blue;
  37. -khtml-opacity: 0;
  38. -moz-opacity: 0;
  39. filter: alpha(opacity=0);
  40. filter: "alpha(opacity=0)";
  41. opacity: 0;
  42. filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
  43. }
  44. .firefoxLink {
  45. width: 163px;
  46. height: 66px;
  47. position: absolute;
  48. left: 50%;
  49. top: 450px;
  50. cursor: pointer;
  51. margin-left: 9px;
  52. background-color: pink;
  53. filter: progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0f000000, endColorstr=#0f000000);
  54. -khtml-opacity: 0;
  55. -moz-opacity: 0;
  56. filter: alpha(opacity=0);
  57. filter: "alpha(opacity=0)";
  58. opacity: 0;
  59. filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
  60. }
  61. </style>
  62. </head>
  63. <body>
  64. <div style="position: absolute; top:-100000px; left:-100000px;">
  65. <input type="text">
  66. <input type="password">
  67. </div>
  68. <div id="app"></div>
  69. <div id='ie_tip' style='display:none'><img style='position:absolute;left:50%;margin-left:-366px;' src='/static/images/ltIE9.png'><a
  70. href='https://www.baidu.com/s?ie=UTF-8&wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' class='chromLink'></a><a
  71. href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' class='firefoxLink'></a></div>
  72. <!-- built files will be auto injected -->
  73. </body>
  74. <script>
  75. (function (window) { // ie9以下浏览器
  76. var theUA = window.navigator.userAgent.toLowerCase();
  77. if ((theUA.match(/msie\s\d+/) && theUA.match(/msie\s\d+/)[0]) || (theUA.match(/trident\s?\d+/) && theUA.match(/trident\s?\d+/)[0])) {
  78. var ieVersion = theUA.match(/msie\s\d+/)[0].match(/\d+/)[0] || theUA.match(/trident\s?\d+/)[0];
  79. if (ieVersion < 9) {
  80. // document.writeln("<img style='position:absolute;left:50%;margin-left:-366px;' src='./static/images/ltIE9.png'><a href='https://www.baidu.com/s?ie=UTF-8&wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' class='chromLink'></a><a href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' class='firefoxLink'></a>");
  81. // document.execCommand("Stop");
  82. var app = document.getElementById("app")
  83. var ie_tip = document.getElementById("ie_tip")
  84. ie_tip.style.display = 'block';
  85. app.appendChild(ie_tip)
  86. };
  87. }
  88. })(window);
  89. // (async () => {
  90. // try {
  91. // console.info('WWOpenData demo start')
  92. // if (/MicroMessenger/i.test(navigator.userAgent)) {
  93. // await config(window.configParams)
  94. // }
  95. // await agentConfig(window.agentConfigParams)
  96. // // 若一切正常,此时可以在 window 上看到 WWOpenData 对象
  97. // console.log('=========================')
  98. // console.log('window.WWOpenData', window.WWOpenData)
  99. // console.log('=========================')
  100. // if (WWOpenData.checkSession) {
  101. // WWOpenData.checkSession({
  102. // success() {
  103. // console.info('open-data 登录态校验成功')
  104. // },
  105. // fail() {
  106. // console.error('open-data 登录态过期')
  107. // },
  108. // })
  109. // }
  110. // if (WWOpenData.on) {
  111. // /**
  112. // * ww-open-data 元素数据发生变更时触发
  113. // */
  114. // WWOpenData.on('update', event => {
  115. // const openid = event.detail.element.getAttribute('openid')
  116. // console.info('渲染数据发生变更', openid, event.detail.hasData)
  117. // })
  118. // /**
  119. // * ww-open-data 获取数据失败时触发
  120. // */
  121. // WWOpenData.on('error', () => {
  122. // console.error('获取数据失败')
  123. // })
  124. // }
  125. // /**
  126. // * 创建 ww-open-data 元素
  127. // */
  128. // const container = document.getElementById('container')
  129. // // 这里的 window.openidList 是该 demo 页面自行组织的数据,不具备普遍性
  130. // // 开发者进行开发时,需要自己拿到授权企业相对应的 openid
  131. // // 关于 openid 的定义与获得方式,可以关注文档注意事项的第 5 点
  132. // for (const openid of window.openidList) {
  133. // const element = document.createElement('ww-open-data')
  134. // element.setAttribute('type', 'userName')
  135. // element.setAttribute('openid', openid)
  136. // container.appendChild(element)
  137. // }
  138. // /**
  139. // * 绑定 document 上全部的 ww-open-data 元素
  140. // */
  141. // WWOpenData.bindAll(document.querySelectorAll('ww-open-data'))
  142. // console.info('WWOpenData demo end')
  143. // } catch (error) {
  144. // console.error('WWOpenData demo error', error)
  145. // }
  146. // /**
  147. // * 调用 wx.config
  148. // *
  149. // * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90547
  150. // */
  151. // async function config(config) {
  152. // return new Promise((resolve, reject) => {
  153. // console.info('wx.config', config)
  154. // wx.config(config)
  155. // wx.ready(resolve)
  156. // wx.error(reject)
  157. // }).then(() => {
  158. // console.info('wx.ready')
  159. // }, error => {
  160. // console.error('wx.error', error)
  161. // throw error
  162. // })
  163. // }
  164. // /**
  165. // * 调用 wx.agentConfig
  166. // *
  167. // * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90548
  168. // */
  169. // async function agentConfig(config) {
  170. // return new Promise((success, fail) => {
  171. // console.info('wx.agentConfig', config)
  172. // wx.agentConfig({ ...config, success, fail })
  173. // }).then(res => {
  174. // console.info('wx.agentConfig success', res)
  175. // return res
  176. // }, error => {
  177. // console.error('wx.agentConfig fail', error)
  178. // throw error
  179. // })
  180. // }
  181. // })()
  182. </script>
  183. </html>