|
@@ -1,3 +1,4 @@
|
|
|
|
|
+/* eslint-disable no-restricted-globals */
|
|
|
import React, { useState } from 'react'
|
|
import React, { useState } from 'react'
|
|
|
import '../assets/css/login.css'
|
|
import '../assets/css/login.css'
|
|
|
import SchoolImg from '../assets/image/school.png'
|
|
import SchoolImg from '../assets/image/school.png'
|
|
@@ -6,6 +7,8 @@ import PassworldImg from '../assets/image/passworld.png'
|
|
|
import config from '../config'
|
|
import config from '../config'
|
|
|
import qs from 'qs';
|
|
import qs from 'qs';
|
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
|
|
|
+import BaoanImg from "../assets/image/1.svg"
|
|
|
|
|
+import szImg from "../assets/image/2.svg"
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-useless-escape
|
|
// eslint-disable-next-line no-useless-escape
|
|
|
const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$");
|
|
const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$");
|
|
@@ -46,7 +49,7 @@ function Login(props) {
|
|
|
let progressTimer = setInterval(() => {
|
|
let progressTimer = setInterval(() => {
|
|
|
setProgress()
|
|
setProgress()
|
|
|
}, 100);
|
|
}, 100);
|
|
|
- let aa = window.location.hostname.indexOf('cocorobo.cn') > -1||window.location.hostname.indexOf('localhost') > -1
|
|
|
|
|
|
|
+ let aa = window.location.hostname.indexOf('cocorobo.cn') > -1 || window.location.hostname.indexOf('localhost') > -1
|
|
|
let params = {
|
|
let params = {
|
|
|
geetest_challenge: "",
|
|
geetest_challenge: "",
|
|
|
geetest_validate: "",
|
|
geetest_validate: "",
|
|
@@ -73,7 +76,7 @@ function Login(props) {
|
|
|
showAlert(props.lang.loginError)
|
|
showAlert(props.lang.loginError)
|
|
|
console.log(err)
|
|
console.log(err)
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
const postMessageToParent = (id, status, data) => {
|
|
const postMessageToParent = (id, status, data) => {
|
|
|
//TODO: replace origin
|
|
//TODO: replace origin
|
|
@@ -148,11 +151,31 @@ function Login(props) {
|
|
|
<div className='login-input'>
|
|
<div className='login-input'>
|
|
|
<img src={PassworldImg} alt="passworld" />
|
|
<img src={PassworldImg} alt="passworld" />
|
|
|
<input type="Password" onChange={passworldChange} placeholder={props.lang.password} value={passworld} />
|
|
<input type="Password" onChange={passworldChange} placeholder={props.lang.password} value={passworld} />
|
|
|
- {loginState && <p style={{ marginTop: 5, textAlign: 'left',color:"red" }}>{loginError}</p>}
|
|
|
|
|
|
|
+ {loginState && <p style={{ marginTop: 5, textAlign: 'left', color: "red" }}>{loginError}</p>}
|
|
|
</div>
|
|
</div>
|
|
|
<div className='login-input'>
|
|
<div className='login-input'>
|
|
|
<button onClick={login}>{props.lang.login}</button>
|
|
<button onClick={login}>{props.lang.login}</button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div className='login-input '>
|
|
|
|
|
+ <div className='three-button'>
|
|
|
|
|
+ <span style={{marginRight:30}} onClick={() => {
|
|
|
|
|
+ top.location.href = 'https://bjt.baoan.edu.cn/'
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <img src={szImg} alt="baoan" />宝教通
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span onClick={() => {
|
|
|
|
|
+ top.location.href = 'https://sz.edu.cn/portal-web/#/'
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <img src={BaoanImg} alt="shenjiao"/>深教AI
|
|
|
|
|
+ </span>
|
|
|
|
|
+ {/* <button onClick={() => {
|
|
|
|
|
+ top.location.href = 'https://bjt.baoan.edu.cn/'
|
|
|
|
|
+ }}>宝教通</button>
|
|
|
|
|
+ <button onClick={() => {
|
|
|
|
|
+ top.location.href = 'https://sz.edu.cn/portal-web/#/'
|
|
|
|
|
+ }}>深教AI</button> */}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|