forked from Gitlink/forgeplus-react
添加第三方登录
This commit is contained in:
parent
12d8f5bf5d
commit
4bc79b5153
|
@ -98,7 +98,6 @@ class NewHeader extends Component {
|
|||
}
|
||||
|
||||
educoderlogin = () => {
|
||||
console.log('111',window.location.pathname);
|
||||
//登录账号
|
||||
if(window.location.pathname === "/"){
|
||||
window.location.href="/login";
|
||||
|
@ -375,7 +374,6 @@ class NewHeader extends Component {
|
|||
}
|
||||
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
console.log('Header.js',this.props)
|
||||
return (
|
||||
<div className="newHeaders" id="nHeader">
|
||||
<div className="headerContent">
|
||||
|
|
|
@ -414,7 +414,6 @@ class LoginDialog extends Component {
|
|||
let { disabled } = this.state;
|
||||
if (disabled === false && e.keyCode === 13) {
|
||||
this.loginEDU()
|
||||
console.log(1)
|
||||
}
|
||||
};
|
||||
getloginurl = (url) => {
|
||||
|
@ -457,8 +456,6 @@ class LoginDialog extends Component {
|
|||
render() {
|
||||
let { login, isGoing, isGoingValue, disabled , Phonenumberisnotco , dialogBox, isRender, weixinlogin } = this.state;
|
||||
let { settings } = this.props;
|
||||
console.log('LofinDialog.js_props',this.props);
|
||||
console.log('LofinDialog.js_third_party_lenght',settings && settings.third_party && settings.third_party.length);
|
||||
|
||||
if (isRender === undefined) {
|
||||
isRender = false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useRef, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Form, Input, Button, Checkbox } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
import axios from 'axios';
|
||||
|
@ -7,16 +7,10 @@ import cookie from 'react-cookies';
|
|||
import './LoginRegisterPage.scss';
|
||||
|
||||
function Login(props){
|
||||
console.log('Login.js',props);
|
||||
const [message,setMessage] = useState();
|
||||
const [setting, setSetting] = useState({
|
||||
third_party: [{
|
||||
name: "educoder",
|
||||
url: "https://data.educoder.net/oauth2?call_url=/oauth/authorize?client_id=d060ea87615f6f731880857bccc73f2620b0421b6780532cdf0df33583dbab4d&redirect_uri=https%3A%2F%2Fforgeplus.trustie.net%2Fapi%2Fauth%2Feducoder%2Fcallback&response_type=code"
|
||||
}]
|
||||
});
|
||||
const [setting, setSetting] = useState(undefined);
|
||||
const {form} = props;
|
||||
const { getFieldDecorator } = form;
|
||||
const {getFieldDecorator } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
//控制密码输入框在DOM不可见value
|
||||
|
@ -24,7 +18,6 @@ function Login(props){
|
|||
//请求settings.json接口获取第三方登录平台信息
|
||||
axios.get(`/setting.json`).then((response) => {
|
||||
if (response && response.data) {
|
||||
console.log('response.data',response.data);
|
||||
setSetting(response.data.setting);
|
||||
}
|
||||
})
|
||||
|
@ -69,7 +62,6 @@ function Login(props){
|
|||
}
|
||||
}
|
||||
|
||||
console.log('setting',setting);
|
||||
return(
|
||||
<div>
|
||||
<div className="right_cont login_content">
|
||||
|
|
|
@ -10,8 +10,6 @@ import img2 from './img/img2.png';
|
|||
import '../loginRegister/LoginRegisterPage.scss';
|
||||
|
||||
function LoginRegisterPage(props){
|
||||
console.log('LoginRegisterPage.js',props);
|
||||
|
||||
return(
|
||||
<div className="login_register">
|
||||
<div className="login_register_left">
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
background-image: url(./img/bg.png);
|
||||
.logo{
|
||||
height: 65px;
|
||||
margin-top: 200px;
|
||||
margin-top: 160px;
|
||||
}
|
||||
.ball{
|
||||
height: 220px;
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
bottom: 300px;
|
||||
bottom: 270px;
|
||||
animation: moving2 10s linear infinite;
|
||||
}
|
||||
@keyframes moving2 {
|
||||
|
@ -38,7 +38,7 @@
|
|||
.banner{
|
||||
height: 486px;
|
||||
position: absolute;
|
||||
bottom: -50px;
|
||||
bottom: -90px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue