|
|
@ -2,6 +2,7 @@ import React, {Component} from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {Button} from 'antd';
|
|
|
|
import {Button} from 'antd';
|
|
|
|
|
|
|
|
import {broadcastChannelPostMessage} from 'educoder';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import './common.css'
|
|
|
|
import './common.css'
|
|
|
|
import mytc from './img/mytc.png';
|
|
|
|
import mytc from './img/mytc.png';
|
|
|
@ -17,6 +18,7 @@ import ysj from './img/ysj.png';
|
|
|
|
import yunwei from './img/yunwei.png';
|
|
|
|
import yunwei from './img/yunwei.png';
|
|
|
|
import rgzn from './img/rgzn.png';
|
|
|
|
import rgzn from './img/rgzn.png';
|
|
|
|
import qita from './img/qita.png';
|
|
|
|
import qita from './img/qita.png';
|
|
|
|
|
|
|
|
|
|
|
|
//父组件 EducoderLogin.js
|
|
|
|
//父组件 EducoderLogin.js
|
|
|
|
class InterestpageComponent extends Component {
|
|
|
|
class InterestpageComponent extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
@ -65,12 +67,14 @@ class InterestpageComponent extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳转然后登入
|
|
|
|
//跳转然后登入
|
|
|
|
Jumptotheinterestpage=(username,password)=>{
|
|
|
|
Jumptotheinterestpage=()=>{
|
|
|
|
var url = "/accounts/login.json";
|
|
|
|
var url = "/accounts/login.json";
|
|
|
|
axios.post(url, {
|
|
|
|
axios.post(url, {
|
|
|
|
login: username,
|
|
|
|
login: this.props.login,
|
|
|
|
password: password,
|
|
|
|
password: this.props.password,
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
if (response === undefined) {
|
|
|
|
if (response === undefined) {
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -79,6 +83,7 @@ class InterestpageComponent extends Component {
|
|
|
|
if (response.data.status === 402) {
|
|
|
|
if (response.data.status === 402) {
|
|
|
|
window.location.href = response.data.url;
|
|
|
|
window.location.href = response.data.url;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
broadcastChannelPostMessage('refreshPage')
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
isRender: false
|
|
|
|
isRender: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|