123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8" />
- <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
- </head>
- <style type="text/css">
- body {
- margin: 0;
- overflow: hidden;
- width: 300px;
- }
- #root {
- overflow: hidden;
- margin-top: -45px;
- height: 350px;
- }
- .loading-bg {
- background: #fff;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 1;
- opacity: 0.9;
- }
- .page-loading-warp {
- padding: 130px;
- display: flex;
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 0;
- left: 0;
- position: fixed;
- z-index: 2;
- }
- .ant-spin {
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- color: rgba(0, 0, 0, 0.65);
- font-size: 14px;
- font-variant: tabular-nums;
- line-height: 1.5;
- list-style: none;
- -webkit-font-feature-settings: 'tnum';
- font-feature-settings: 'tnum';
- position: absolute;
- display: none;
- color: #1890ff;
- text-align: center;
- vertical-align: middle;
- opacity: 0;
- -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
- transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
- transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
- transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
- -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
- }
- .ant-spin-spinning {
- position: static;
- display: inline-block;
- opacity: 1;
- }
- .ant-spin-dot {
- position: relative;
- display: inline-block;
- font-size: 20px;
- width: 20px;
- height: 20px;
- }
- .ant-spin-dot-item {
- position: absolute;
- display: block;
- width: 9px;
- height: 9px;
- background-color: #1890ff;
- border-radius: 100%;
- -webkit-transform: scale(0.75);
- -ms-transform: scale(0.75);
- transform: scale(0.75);
- -webkit-transform-origin: 50% 50%;
- -ms-transform-origin: 50% 50%;
- transform-origin: 50% 50%;
- opacity: 0.3;
- -webkit-animation: antSpinMove 1s infinite linear alternate;
- animation: antSpinMove 1s infinite linear alternate;
- }
- .ant-spin-dot-item:nth-child(1) {
- top: 0;
- left: 0;
- }
- .ant-spin-dot-item:nth-child(2) {
- top: 0;
- right: 0;
- -webkit-animation-delay: 0.4s;
- animation-delay: 0.4s;
- }
- .ant-spin-dot-item:nth-child(3) {
- right: 0;
- bottom: 0;
- -webkit-animation-delay: 0.8s;
- animation-delay: 0.8s;
- }
- .ant-spin-dot-item:nth-child(4) {
- bottom: 0;
- left: 0;
- -webkit-animation-delay: 1.2s;
- animation-delay: 1.2s;
- }
- .ant-spin-dot-spin {
- -webkit-transform: rotate(45deg);
- -ms-transform: rotate(45deg);
- transform: rotate(45deg);
- -webkit-animation: antRotate 1.2s infinite linear;
- animation: antRotate 1.2s infinite linear;
- }
- .ant-spin-lg .ant-spin-dot {
- font-size: 32px;
- width: 32px;
- height: 32px;
- }
- .ant-spin-lg .ant-spin-dot i {
- width: 14px;
- height: 14px;
- }
- @media all and (-ms-high-contrast: none),
- (-ms-high-contrast: active) {
- .ant-spin-blur {
- background: #fff;
- opacity: 0.5;
- }
- }
- @-webkit-keyframes antSpinMove {
- to {
- opacity: 1;
- }
- }
- @keyframes antSpinMove {
- to {
- opacity: 1;
- }
- }
- @-webkit-keyframes antRotate {
- to {
- -webkit-transform: rotate(405deg);
- transform: rotate(405deg);
- }
- }
- @keyframes antRotate {
- to {
- -webkit-transform: rotate(405deg);
- transform: rotate(405deg);
- }
- }
- </style>
- <body>
- <div id="root"></div>
- <div id="loading">
- <div class="loading-bg"></div>
- <div class="page-loading-warp">
- <div class="ant-spin ant-spin-lg ant-spin-spinning">
- <span class="ant-spin-dot ant-spin-dot-spin">
- <i class="ant-spin-dot-item"></i>
- <i class="ant-spin-dot-item"></i>
- <i class="ant-spin-dot-item"></i>
- <i class="ant-spin-dot-item"></i>
- </span>
- </div>
- </div>
- </div>
- </body>
- <script>
- function getQuery(name) {
- var reg = new RegExp(`(^|\\?|&)${name}=([^&]*)(&|$)`);
- var r = window.location.href.substr(1).match(reg);
- if (r != null) return unescape(r[2]);
- return null;
- }
- var code = getQuery('code');
- if (code) {
- window.top.postMessage('code:' + code, '*');
- } else {
- document.getElementById('loading').style.display = 'none';
- }
- new WxLogin({
- id: 'root',
- self_redirect: true,
- appid: getQuery('appid'),
- scope: 'snsapi_login',
- redirect_uri: getQuery('redirectUri') + '/login.html',
- });
- </script>
- </html>
|