添加第三方登录

This commit is contained in:
谢思 2021-11-08 15:43:55 +08:00
parent 12d8f5bf5d
commit 4bc79b5153
5 changed files with 6 additions and 21 deletions

View File

@ -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">

View File

@ -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

View File

@ -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(()=>{
//DOMvalue
@ -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">

View File

@ -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">

View File

@ -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;
}
}