chao 3 mesi fa
parent
commit
bec5cab879
5 ha cambiato i file con 52 aggiunte e 4 eliminazioni
  1. 1 1
      public/index.html
  2. 13 0
      src/assets/css/login.css
  3. 6 0
      src/assets/image/1.svg
  4. 6 0
      src/assets/image/2.svg
  5. 26 3
      src/view/login.js

+ 1 - 1
public/index.html

@@ -28,7 +28,7 @@
     } else if (window.location.hostname.indexOf('cocorobo.hk') > -1) {
       document.domain = 'cocorobo.hk'
     } else {
-      // document.domain = 'cocorobo.cn'
+      document.domain = 'cocorobo.cn'
     }
   </script>
   <title>CocoRobo Login</title>

+ 13 - 0
src/assets/css/login.css

@@ -54,4 +54,17 @@
     text-align: center;
     outline: none;
     cursor: pointer;
+}
+.login .login-input .three-button{
+    text-align: center;
+}
+.login .login-input .three-button span{
+    
+    cursor: pointer;
+}
+.login .login-input .three-button img{
+    position: static;
+    border: none;
+    width: 40px;
+    vertical-align: middle;
 }

File diff suppressed because it is too large
+ 6 - 0
src/assets/image/1.svg


File diff suppressed because it is too large
+ 6 - 0
src/assets/image/2.svg


+ 26 - 3
src/view/login.js

@@ -1,3 +1,4 @@
+/* eslint-disable no-restricted-globals */
 import React, { useState } from 'react'
 import '../assets/css/login.css'
 import SchoolImg from '../assets/image/school.png'
@@ -6,6 +7,8 @@ import PassworldImg from '../assets/image/passworld.png'
 import config from '../config'
 import qs from 'qs';
 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
 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(() => {
             setProgress()
         }, 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 = {
             geetest_challenge: "",
             geetest_validate: "",
@@ -73,7 +76,7 @@ function Login(props) {
             showAlert(props.lang.loginError)
             console.log(err)
         })
-        
+
     }
     const postMessageToParent = (id, status, data) => {
         //TODO: replace origin
@@ -148,11 +151,31 @@ function Login(props) {
             <div className='login-input'>
                 <img src={PassworldImg} alt="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 className='login-input'>
                 <button onClick={login}>{props.lang.login}</button>
             </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>
     )
 }

Some files were not shown because too many files changed in this diff