Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
1bad31cd
Commit
1bad31cd
authored
Jun 24, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Plain Diff
feat:解决合并代码后的冲突
parents
58c58cfc
be13851c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
273 additions
and
269 deletions
+273
-269
src/common/less/icon-font.less
+8
-11
src/index.html
+0
-0
src/modules/root/Header.jsx
+0
-0
src/modules/root/Header.less
+89
-81
src/modules/root/Login.jsx
+0
-0
src/modules/root/Login.less
+29
-35
src/modules/root/WechatLogin.less
+24
-25
src/modules/root/WechatLogin.tsx
+123
-117
No files found.
src/common/less/icon-font.less
View file @
1bad31cd
@font-face {
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot');
src: url('//at.alicdn.com/t/font_2223403_oe5p510553.woff2?t=1624259078391') format('woff2'),
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.woff?t=1624259078391') format('woff'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.ttf?t=1624259078391') format('truetype');
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.svg#iconfont') format('svg');
}
}
.iconfont{
.iconfont
{
font-family:
"iconfont"
!important;
font-family:
'iconfont'
!important;
font-size:16px;
font-size:
16px;
font-style:normal;
font-style:
normal;
}
}
src/index.html
View file @
1bad31cd
This diff is collapsed.
Click to expand it.
src/modules/root/Header.jsx
View file @
1bad31cd
This diff is collapsed.
Click to expand it.
src/modules/root/Header.less
View file @
1bad31cd
@import
"../../core/variables.less"
;
@import
'../../core/variables.less'
;
@top-height: 60px;
@top-height: 60px;
@icon-color: #939393;
@icon-color: #939393;
.top-container {
.top-container {
...
@@ -7,16 +7,23 @@
...
@@ -7,16 +7,23 @@
left: 0;
left: 0;
right: 0;
right: 0;
height: @top-height;
height: @top-height;
background-color: #2966
FF
;
background-color: #2966
ff
;
// z-index:2;
// z-index:2;
&::after{
&::after {
content:'';
content: '';
width:100%;
width: 100%;
height:60px;
height: 60px;
background: linear-gradient(180deg, #2966FF 0%, rgba(41, 102, 255, 0.82) 29%, rgba(41, 102, 255, 0.58) 55%, rgba(41, 102, 255, 0.27) 77%, rgba(7, 78, 255, 0) 100%);
background: linear-gradient(
position:absolute;
180deg,
z-index:2;
#2966ff 0%,
top:59px;
rgba(41, 102, 255, 0.82) 29%,
rgba(41, 102, 255, 0.58) 55%,
rgba(41, 102, 255, 0.27) 77%,
rgba(7, 78, 255, 0) 100%
);
position: absolute;
z-index: 2;
top: 59px;
}
}
.logo {
.logo {
display: inline-block;
display: inline-block;
...
@@ -26,7 +33,7 @@
...
@@ -26,7 +33,7 @@
.logo-name {
.logo-name {
font-size: 14px;
font-size: 14px;
font-weight: 500;
font-weight: 500;
color: #2966
FF
;
color: #2966
ff
;
line-height: 20px;
line-height: 20px;
vertical-align: middle;
vertical-align: middle;
font-weight: bold;
font-weight: bold;
...
@@ -204,7 +211,7 @@
...
@@ -204,7 +211,7 @@
cursor: pointer;
cursor: pointer;
}
}
.college-name {
.college-name {
color:
#FFFFFF
;
color:
#ffffff
;
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
overflow: hidden;
...
@@ -213,9 +220,9 @@
...
@@ -213,9 +220,9 @@
.icon {
.icon {
font-size: 14px;
font-size: 14px;
margin-left: 8px;
margin-left: 8px;
color: #
FFF
;
color: #
fff
;
&:hover {
&:hover {
color:
#FFF
;
color:
#fff
;
}
}
}
}
}
}
...
@@ -283,7 +290,7 @@
...
@@ -283,7 +290,7 @@
align-items: center;
align-items: center;
.store-name {
.store-name {
font-size: 14px;
font-size: 14px;
color: #
FFF
;
color: #
fff
;
line-height: 49px;
line-height: 49px;
margin-left: 8px;
margin-left: 8px;
white-space: nowrap;
white-space: nowrap;
...
@@ -296,17 +303,17 @@
...
@@ -296,17 +303,17 @@
width: 1px;
width: 1px;
height: 16px;
height: 16px;
background-color: #f4f4f4;
background-color: #f4f4f4;
margin-right:16px;
margin-right:
16px;
}
}
}
}
.right-box {
.right-box {
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
.right-bg-img{
.right-bg-img
{
img{
img
{
width:277px;
width:
277px;
height:60px;
height:
60px;
}
}
}
}
.link-to-store {
.link-to-store {
...
@@ -315,90 +322,91 @@
...
@@ -315,90 +322,91 @@
line-height: 49px;
line-height: 49px;
.text {
.text {
font-size: 14px;
font-size: 14px;
color: #
FFF
;
color: #
fff
;
line-height: 49px;
line-height: 49px;
margin-left: 7px;
margin-left: 7px;
}
}
.iconfont {
.iconfont {
color: #
FFF
;
color: #
fff
;
}
}
.link {
.link {
cursor: pointer;
cursor: pointer;
position: relative;
position: relative;
.link-btn{
.link-btn
{
padding:3px 12px;
padding:
3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
border-radius: 4px;
&:hover{
&:hover
{
border: 1px solid rgba(255, 255, 255, 1);
border: 1px solid rgba(255, 255, 255, 1);
}
}
}
}
.store-popover {
.store-popover {
position: absolute;
display: none;
display: none;
width: 216px;
height: 260px;
top: 49px;
left: 0;
background-color: #fff;
flex-wrap: wrap;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
z-index: 10;
.pc-url {
display: flex;
justify-content: space-between;
width: 100%;
height: 56px;
padding: 16px;
border-bottom: 1px solid #e8e8e8;
.name {
width: 70px;
font-size: 14px;
color: #333333;
line-height: 20px;
}
.url-link {
color: #2966ff;
font-size: 14px;
line-height: 20px;
}
}
.h5-url {
width: 100%;
.name,
.tip {
width: 70px;
font-size: 14px;
color: #333333;
line-height: 52px;
margin: 0 auto;
}
#h5-qrcode {
width: 110px;
height: 110px;
margin: 0 auto;
}
.tip {
line-height: 41px;
width: 130px;
}
}
}
}
&:hover {
&:hover {
.store-popover {
.store-popover {
position: absolute;
display: flex;
display: flex;
width: 216px;
height: 260px;
top: 49px;
left: 0;
background-color: #fff;
flex-wrap: wrap;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
z-index: 10;
.pc-url {
display: flex;
justify-content: space-between;
width: 100%;
height: 56px;
padding: 16px;
border-bottom: 1px solid #e8e8e8;
.name {
width: 70px;
font-size: 14px;
color: #333333;
line-height: 20px;
}
.url-link {
color: #2966FF;
font-size: 14px;
line-height: 20px;
}
}
.h5-url {
width: 100%;
.name,
.tip {
width: 70px;
font-size: 14px;
color: #333333;
line-height: 52px;
margin: 0 auto;
}
#h5-qrcode {
width: 110px;
height: 110px;
margin: 0 auto;
}
.tip {
line-height: 41px;
width: 130px;
}
}
}
}
}
}
}
}
.share {
.share,
.help {
cursor: pointer;
cursor: pointer;
margin-left: 16px;
margin-left: 16px;
.share-btn{
.share-btn,
padding:3px 12px;
.help-btn {
padding: 3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
border-radius: 4px;
&:hover{
&:hover
{
border: 1px solid rgba(255, 255, 255, 1);
border: 1px solid rgba(255, 255, 255, 1);
}
}
}
}
...
@@ -529,7 +537,7 @@
...
@@ -529,7 +537,7 @@
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
color:
#FFF
;
color:
#fff
;
}
}
}
}
}
}
...
@@ -588,7 +596,7 @@
...
@@ -588,7 +596,7 @@
.user-detail {
.user-detail {
position: relative;
position: relative;
padding-bottom: 16px;
padding-bottom: 16px;
border-bottom: 1px solid #
E8E8E
8;
border-bottom: 1px solid #
e8e8e
8;
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
...
@@ -625,7 +633,7 @@
...
@@ -625,7 +633,7 @@
cursor: pointer;
cursor: pointer;
color: #333;
color: #333;
.menu-before {
.menu-before {
color: #
BFBFBF
;
color: #
bfbfbf
;
margin-right: 8px;
margin-right: 8px;
font-size: 14px;
font-size: 14px;
}
}
...
...
src/modules/root/Login.jsx
View file @
1bad31cd
This diff is collapsed.
Click to expand it.
src/modules/root/Login.less
View file @
1bad31cd
@import url(
"../../core/variables.less"
);
@import url(
'../../core/variables.less'
);
.login-page {
.login-page {
position: static;
position: static;
font-family:
"微软雅黑"
;
font-family:
'微软雅黑'
;
padding: 0;
padding: 0;
min-width: 1200px;
min-width: 1200px;
background: #
F4F6FA
;
background: #
f4f6fa
;
height: 100%;
height: 100%;
overflow-y: hidden;
overflow-y: hidden;
.logo-img-box{
.logo-img-box
{
position: absolute;
position: absolute;
top:24px;
top:
24px;
right:32px;
right:
32px;
z-index:1;
z-index:
1;
.logo-img{
.logo-img
{
width:120px;
width:
120px;
display: inline-block;
display: inline-block;
}
}
}
}
.login-main {
.login-main {
min-width: 1200px;
min-width: 1200px;
display: flex;
display: flex;
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
width: 540px;
width: 540px;
height: 100vh;
height: 100vh;
.img-box {
.img-box {
background: #2966
FF
;
background: #2966
ff
;
width: 540px;
width: 540px;
height: 100vh;
height: 100vh;
img {
img {
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
position: absolute;
position: absolute;
left: 50%;
left: 50%;
top: 50%;
top: 50%;
transform: translate(-50%,-50%);
transform: translate(-50%,
-50%);
}
}
}
}
}
}
...
@@ -50,10 +50,10 @@
...
@@ -50,10 +50,10 @@
height: 256px;
height: 256px;
background: rgba(41, 102, 255, 0.05);
background: rgba(41, 102, 255, 0.05);
position: absolute;
position: absolute;
top:0;
top:
0;
left: 0;
left: 0;
&.right-bottom-block {
&.right-bottom-block {
top:auto;
top:
auto;
left: auto;
left: auto;
bottom: 0;
bottom: 0;
right: 0;
right: 0;
...
@@ -90,11 +90,11 @@
...
@@ -90,11 +90,11 @@
height: 420px;
height: 420px;
position: absolute;
position: absolute;
left: 50%;
left: 50%;
top:50%;
top:
50%;
transform: translate(-50%,-50%);
transform: translate(-50%,
-50%);
overflow: hidden;
overflow: hidden;
background-color: #ffffff;
background-color: #ffffff;
border-radius: 4px;
border-radius: 4px;
.ant-tabs-tab-btn {
.ant-tabs-tab-btn {
color: #999999;
color: #999999;
font-size: 18px;
font-size: 18px;
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
.ant-tabs-tab-active {
.ant-tabs-tab-active {
.ant-tabs-tab-btn {
.ant-tabs-tab-btn {
color: #333333;
color: #333333;
font-weight:
500
!important;
font-weight:
500
!important;
}
}
}
}
.ant-tabs-nav::before {
.ant-tabs-nav::before {
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
}
}
.ant-tabs-tab {
.ant-tabs-tab {
text-align: center;
text-align: center;
margin:0;
margin:
0;
}
}
.ant-tabs > .ant-tabs-nav .ant-tabs-nav-list {
.ant-tabs > .ant-tabs-nav .ant-tabs-nav-list {
margin: 0 auto;
margin: 0 auto;
...
@@ -128,13 +128,7 @@
...
@@ -128,13 +128,7 @@
width: 280px;
width: 280px;
height: 100%;
height: 100%;
background: @primary;
background: @primary;
background: -webkit-gradient(
background: -webkit-gradient(linear, left top, left bottom, from(#ffaa1a), to(#ff8634)) !important;
linear,
left top,
left bottom,
from(#ffaa1a),
to(#ff8634)
) !important;
display: flex;
display: flex;
display: -webkit-flex;
display: -webkit-flex;
-webkit-flex-direction: column;
-webkit-flex-direction: column;
...
@@ -197,8 +191,8 @@
...
@@ -197,8 +191,8 @@
}
}
}
}
}
}
.login-form{
.login-form
{
margin-top:32px;
margin-top:
32px;
}
}
.qrcode {
.qrcode {
display: none;
display: none;
...
@@ -281,7 +275,7 @@
...
@@ -281,7 +275,7 @@
font-weight: 500;
font-weight: 500;
color: #333;
color: #333;
&::after {
&::after {
content:
""
;
content:
''
;
display: block;
display: block;
width: 24px;
width: 24px;
height: 4px;
height: 4px;
...
@@ -383,12 +377,12 @@
...
@@ -383,12 +377,12 @@
border-radius: 3px;
border-radius: 3px;
margin-top: 60px;
margin-top: 60px;
font-size: 14px; // font-weight: 300;
font-size: 14px; // font-weight: 300;
color:
#2966FF
;
color:
#2966ff
;
&:hover {
&:hover {
color: #2966
FF
;
color: #2966
ff
;
}
}
&::before {
&::before {
content:
""
;
content:
''
;
display: block;
display: block;
height: 20px;
height: 20px;
width: 1px;
width: 1px;
...
@@ -416,7 +410,7 @@
...
@@ -416,7 +410,7 @@
}
}
.refresh {
.refresh {
font-size: 14px;
font-size: 14px;
color: #2966
FF
;
color: #2966
ff
;
cursor: pointer;
cursor: pointer;
}
}
}
}
...
@@ -466,10 +460,10 @@
...
@@ -466,10 +460,10 @@
transition: all 0.3s;
transition: all 0.3s;
cursor: pointer;
cursor: pointer;
border: none;
border: none;
text-align:center;
text-align:
center;
&:hover {
&:hover {
opacity: 0.7;
opacity: 0.7;
background: #5
C8AFF
;
background: #5
c8aff
;
}
}
}
}
}
}
...
...
src/modules/root/WechatLogin.less
View file @
1bad31cd
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
color: #999999;
color: #999999;
line-height: 20px;
line-height: 20px;
}
}
.rwm{
.rwm
{
position: relative;
position: relative;
width: 210px;
width: 210px;
height: 210px;
height: 210px;
...
@@ -18,30 +18,29 @@
...
@@ -18,30 +18,29 @@
margin-top: 24px;
margin-top: 24px;
border: 1px solid #e8e8e8;
border: 1px solid #e8e8e8;
border-radius: 2px;
border-radius: 2px;
padding:15px;
padding: 15px;
.error{
.error {
position: absolute;
position: absolute;
width: 200px;
width: 200px;
height: 200px;
height: 200px;
background: rgba(255, 255, 255, 0.95);
background: rgba(255, 255, 255, 0.95);
display: flex;
display: flex;
align-items:center;
align-items: center;
justify-content:center;
justify-content: center;
left:5px;
left: 5px;
top:5px;
top: 5px;
div{
div {
margin: 0 10px;
margin: 0 10px;
font-size: 14px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
font-weight: 400;
color: #333333;
color: #333333;
line-height: 20px;
line-height: 20px;
}
}
.ope {
.ope{
cursor: pointer;
cursor: pointer;
color: rgba(82, 137, 250, 1);
color:rgba(82, 137, 250, 1);
}
}
}
}
}
}
...
...
src/modules/root/WechatLogin.tsx
View file @
1bad31cd
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
qrcode
from
"@/libs/qrcode/qrcode.js"
;
import
qrcode
from
'@/libs/qrcode/qrcode.js'
;
import
Service
from
"@/common/js/service"
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
{
PATH
}
from
'@/domains/basic-domain/constants'
;
import
{
PATH
}
from
'@/domains/basic-domain/constants'
;
import
'./WechatLogin.less'
import
'./WechatLogin.less'
;
const
Logo
=
require
(
"@/common/images/logo.png"
)
const
Logo
=
require
(
'@/common/images/logo.png'
);
declare
var
location
:
any
;
declare
var
location
:
any
;
declare
var
window
:
any
;
declare
var
window
:
any
;
export
default
function
WechatLogin
(
props
:
any
)
{
export
default
function
WechatLogin
(
props
:
any
)
{
const
freshTime
=
60
;
const
freshTime
=
60
;
const
init
:
any
=
null
;
const
init
:
any
=
null
;
const
[
status
,
setStatus
]
=
useState
(
0
);
const
[
status
,
setStatus
]
=
useState
(
0
);
const
[
ticket
,
setTicket
]
=
useState
(
''
);
const
[
ticket
,
setTicket
]
=
useState
(
''
);
const
[
leftTime
,
setLeftTime
]
=
useState
(
freshTime
)
const
[
leftTime
,
setLeftTime
]
=
useState
(
freshTime
);
const
QRCode
=
useRef
(
init
);
const
QRCode
=
useRef
(
init
);
const
timer
=
useRef
(
init
);
const
timer
=
useRef
(
init
);
const
leftTimeRef
=
useRef
(
init
);
const
leftTimeRef
=
useRef
(
init
);
useEffect
(()
=>
{
leftTimeRef
.
current
=
leftTime
;
},
[
leftTime
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
leftTimeRef
.
current
=
leftTime
;
clearInterval
(
timer
.
current
as
any
);
},
[
leftTime
])
if
(
status
===
0
)
{
Service
.
Hades
(
'anon/hades/getTicket'
,
{}).
then
((
res
:
any
)
=>
{
useEffect
(()
=>
{
setTicket
(
res
.
result
);
clearInterval
(
timer
.
current
as
any
);
const
redirect
=
`
${
PATH
}
?ticket=
${
res
.
result
}
&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=
${
process
.
env
.
DEPLOY_ENV
||
'dev'
}
`
;
if
(
status
===
0
)
{
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
Service
.
Hades
(
"anon/hades/getTicket"
,
{}).
then
((
res
:
any
)
=>
{
let
qrnode
=
new
qrcode
({
setTicket
(
res
.
result
)
text
:
redirect
,
const
redirect
=
`
${
PATH
}
?ticket=
${
res
.
result
}
&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=
${
process
.
env
.
DEPLOY_ENV
||
'dev'
}
`
correctLevel
:
2
,
// console.log(redirect)
size
:
180
,
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
image
:
'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png'
,
// console.log(url)
imageSize
:
50
,
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
});
let
qrnode
=
new
qrcode
({
qrcodeWrapDom
.
innerHTML
=
''
;
text
:
redirect
,
qrcodeWrapDom
&&
qrcodeWrapDom
.
appendChild
(
qrnode
);
correctLevel
:
2
,
// QRCode.current.innerHTML = ''
size
:
180
,
// QRCode.current.prepend(qrnode);
// image: 'https://image.xiaomaiketang.com/xm/Newk4NrxKC.png',
setLeftTime
(
freshTime
);
image
:
'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png'
,
timer
.
current
=
setInterval
(()
=>
{
imageSize
:
50
if
(
leftTimeRef
.
current
==
0
)
{
});
qrcodeWrapDom
.
innerHTML
=
''
;
qrcodeWrapDom
&&
qrcodeWrapDom
.
appendChild
(
qrnode
);
// QRCode.current.innerHTML = ''
// QRCode.current.prepend(qrnode);
setLeftTime
(
freshTime
);
timer
.
current
=
setInterval
(()
=>
{
if
(
leftTimeRef
.
current
==
0
)
{
clearInterval
(
timer
.
current
);
setStatus
(
1
);
return
}
setLeftTime
(
leftTimeRef
.
current
-
1
);
},
1000
)
})
}
return
()
=>
{
clearInterval
(
timer
.
current
);
clearInterval
(
timer
.
current
);
}
setStatus
(
1
);
},
[
status
])
return
;
}
useEffect
(()
=>
{
if
(
leftTime
==
60
||
!
ticket
)
{
return
}
Service
.
Hades
(
'anon/hades/getTicketState'
,
{
ticket
}).
then
((
res
:
any
)
=>
{
if
(
res
.
result
===
'AUTH_SUCCESS'
)
{
Service
.
Hades
(
'anon/hades/getTicketWXWorkLogin'
,
{
ticket
}).
then
((
_res
:
any
)
=>
{
User
.
setUserId
(
_res
.
result
.
loginInfo
.
userId
);
User
.
setToken
(
_res
.
result
.
loginInfo
.
xmToken
);
User
.
setEnterpriseId
(
_res
.
result
.
enterpriseId
);
window
.
currentStoreUserInfo
=
{}
window
.
currentStoreUserInfo
.
userId
=
_res
.
result
.
loginInfo
.
userId
;
window
.
currentStoreUserInfo
.
token
=
_res
.
result
.
loginInfo
.
xmToken
;
window
.
currentStoreUserInfo
.
enterpriseId
=
_res
.
result
.
enterpriseId
;
User
.
setIdentifier
(
_res
.
result
.
identifier
)
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
})
})
}
})
},
[
leftTime
])
setLeftTime
(
leftTimeRef
.
current
-
1
);
},
1000
);
});
}
return
()
=>
{
clearInterval
(
timer
.
current
);
};
},
[
status
]);
return
<
div
className=
'wechatLoginBox'
>
useEffect
(()
=>
{
<
div
className=
"rwm"
>
if
(
leftTime
==
60
||
!
ticket
)
{
<
div
id=
"qrcode"
></
div
>
return
;
}
{
Service
.
Hades
(
'anon/hades/getTicketState'
,
{
status
===
1
&&
<
div
className=
"error"
>
ticket
,
<
div
>
二维码已过期
}).
then
((
res
:
any
)
=>
{
<
p
className=
"ope"
onClick=
{
()
=>
{
if
(
res
.
result
===
'AUTH_SUCCESS'
)
{
setStatus
(
0
)
Service
.
Hades
(
'anon/hades/getTicketWXWorkLogin'
,
{
}
}
>
刷新
</
p
>
ticket
,
</
div
>
}).
then
((
_res
:
any
)
=>
{
</
div
>
User
.
setUserId
(
_res
.
result
.
loginInfo
.
userId
);
}
User
.
setToken
(
_res
.
result
.
loginInfo
.
xmToken
);
{
User
.
setEnterpriseId
(
_res
.
result
.
enterpriseId
);
status
===
2
&&
<
div
className=
"error"
>
User
.
setIdentifier
(
_res
.
result
.
identifier
);
<
div
>
所在企业还未注册学院
window
.
currentStoreUserInfo
=
{}
window
.
currentStoreUserInfo
.
userId
=
_res
.
result
.
loginInfo
.
userId
;
window
.
currentStoreUserInfo
.
token
=
_res
.
result
.
loginInfo
.
xmToken
;
window
.
currentStoreUserInfo
.
enterpriseId
=
_res
.
result
.
enterpriseId
;
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
});
});
}
});
},
[
leftTime
]);
<
p
className=
"ope"
onClick=
{
()
=>
{
return
(
setStatus
(
0
)
<
div
className=
'wechatLoginBox'
>
}
}
>
我知道了
</
p
>
<
div
className=
'rwm'
>
</
div
>
<
div
id=
'qrcode'
></
div
>
</
div
>
}
{
status
===
3
&&
<
div
className=
"error"
>
<
div
>
你还不是学院员工,请联系企业管理员
<
p
className=
"ope"
onClick=
{
()
=>
{
{
status
===
1
&&
(
setStatus
(
0
)
<
div
className=
'error'
>
}
}
>
我知道了
</
p
>
<
div
>
</
div
>
二维码已过期
</
div
>
<
p
}
className=
'ope'
</
div
>
onClick=
{
()
=>
{
<
p
className=
'text'
>
请使用企业微信扫码登录
</
p
>
setStatus
(
0
);
}
}
>
刷新
</
p
>
</
div
>
</
div
>
)
}
{
status
===
2
&&
(
<
div
className=
'error'
>
<
div
>
所在企业还未注册学院
<
p
className=
'ope'
onClick=
{
()
=>
{
setStatus
(
0
);
}
}
>
我知道了
</
p
>
</
div
>
</
div
>
)
}
{
status
===
3
&&
(
<
div
className=
'error'
>
<
div
>
你还不是学院员工,请联系企业管理员
<
p
className=
'ope'
onClick=
{
()
=>
{
setStatus
(
0
);
}
}
>
我知道了
</
p
>
</
div
>
</
div
>
)
}
</
div
>
<
p
className=
'text'
>
请使用企业微信扫码登录
</
p
>
</
div
>
</
div
>
}
);
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment