123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="force-rendering" content="webkit"/>
- <meta name="renderer" content="webkit" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,minimum-scale=1.0">
- <title>功道云-积分系统用户登录</title>
-
- <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
- <script type="text/javascript" src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
- <script src="static/js/polyfill.min.js"></script>
-
- <!-- <script>
- /**
- * wx.config 参数
- *
- * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90547
- */
- window.configParams = { /* ... */ }
- /**
- * wx.agentConfig 参数
- *
- * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90548
- */
- window.agentConfigParams = { /* ... */ }
- </script> -->
- <style>
- .chromLink {
- width: 163px;
- height: 66px;
- position: absolute;
- left: 50%;
- top: 450px;
- margin-left: -170px;
- cursor: pointer;
- background-color: blue;
- -khtml-opacity: 0;
- -moz-opacity: 0;
- filter: alpha(opacity=0);
- filter: "alpha(opacity=0)";
- opacity: 0;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
- }
- .firefoxLink {
- width: 163px;
- height: 66px;
- position: absolute;
- left: 50%;
- top: 450px;
- cursor: pointer;
- margin-left: 9px;
- background-color: pink;
- filter: progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0f000000, endColorstr=#0f000000);
- -khtml-opacity: 0;
- -moz-opacity: 0;
- filter: alpha(opacity=0);
- filter: "alpha(opacity=0)";
- opacity: 0;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
- }
- </style>
- </head>
- <body>
- <div style="position: absolute; top:-100000px; left:-100000px;">
- <input type="text">
- <input type="password">
- </div>
- <div id="app"></div>
- <div id='ie_tip' style='display:none'><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></div>
- <!-- built files will be auto injected -->
- </body>
- <script>
- (function (window) { // ie9以下浏览器
- var theUA = window.navigator.userAgent.toLowerCase();
- if ((theUA.match(/msie\s\d+/) && theUA.match(/msie\s\d+/)[0]) || (theUA.match(/trident\s?\d+/) && theUA.match(/trident\s?\d+/)[0])) {
- var ieVersion = theUA.match(/msie\s\d+/)[0].match(/\d+/)[0] || theUA.match(/trident\s?\d+/)[0];
- if (ieVersion < 9) {
- // 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>");
- // document.execCommand("Stop");
- var app = document.getElementById("app")
- var ie_tip = document.getElementById("ie_tip")
- ie_tip.style.display = 'block';
- app.appendChild(ie_tip)
- };
- }
- })(window);
-
- // (async () => {
- // try {
- // console.info('WWOpenData demo start')
- // if (/MicroMessenger/i.test(navigator.userAgent)) {
- // await config(window.configParams)
- // }
- // await agentConfig(window.agentConfigParams)
- // // 若一切正常,此时可以在 window 上看到 WWOpenData 对象
- // console.log('=========================')
- // console.log('window.WWOpenData', window.WWOpenData)
- // console.log('=========================')
- // if (WWOpenData.checkSession) {
- // WWOpenData.checkSession({
- // success() {
- // console.info('open-data 登录态校验成功')
- // },
- // fail() {
- // console.error('open-data 登录态过期')
- // },
- // })
- // }
- // if (WWOpenData.on) {
- // /**
- // * ww-open-data 元素数据发生变更时触发
- // */
- // WWOpenData.on('update', event => {
- // const openid = event.detail.element.getAttribute('openid')
- // console.info('渲染数据发生变更', openid, event.detail.hasData)
- // })
- // /**
- // * ww-open-data 获取数据失败时触发
- // */
- // WWOpenData.on('error', () => {
- // console.error('获取数据失败')
- // })
- // }
- // /**
- // * 创建 ww-open-data 元素
- // */
- // const container = document.getElementById('container')
- // // 这里的 window.openidList 是该 demo 页面自行组织的数据,不具备普遍性
- // // 开发者进行开发时,需要自己拿到授权企业相对应的 openid
- // // 关于 openid 的定义与获得方式,可以关注文档注意事项的第 5 点
- // for (const openid of window.openidList) {
- // const element = document.createElement('ww-open-data')
- // element.setAttribute('type', 'userName')
- // element.setAttribute('openid', openid)
- // container.appendChild(element)
- // }
- // /**
- // * 绑定 document 上全部的 ww-open-data 元素
- // */
- // WWOpenData.bindAll(document.querySelectorAll('ww-open-data'))
- // console.info('WWOpenData demo end')
- // } catch (error) {
- // console.error('WWOpenData demo error', error)
- // }
- // /**
- // * 调用 wx.config
- // *
- // * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90547
- // */
- // async function config(config) {
- // return new Promise((resolve, reject) => {
- // console.info('wx.config', config)
- // wx.config(config)
- // wx.ready(resolve)
- // wx.error(reject)
- // }).then(() => {
- // console.info('wx.ready')
- // }, error => {
- // console.error('wx.error', error)
- // throw error
- // })
- // }
- // /**
- // * 调用 wx.agentConfig
- // *
- // * @see https://open.work.weixin.qq.com/api/doc/90001/90144/90548
- // */
- // async function agentConfig(config) {
- // return new Promise((success, fail) => {
- // console.info('wx.agentConfig', config)
- // wx.agentConfig({ ...config, success, fail })
- // }).then(res => {
- // console.info('wx.agentConfig success', res)
- // return res
- // }, error => {
- // console.error('wx.agentConfig fail', error)
- // throw error
- // })
- // }
- // })()
- </script>
- </html>
|