From 9cc0edfd4b940a4a47ebed212182848edb66ac45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 6 Jul 2019 14:54:26 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/user/Interestpage.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js
index d058d5881..562d77adf 100644
--- a/public/react/src/modules/user/Interestpage.js
+++ b/public/react/src/modules/user/Interestpage.js
@@ -2,6 +2,7 @@ import React, {Component} from 'react';
import {Button} from 'antd';
+import {broadcastChannelPostMessage} from 'educoder';
import axios from 'axios';
import './common.css'
import mytc from './img/mytc.png';
@@ -17,6 +18,7 @@ import ysj from './img/ysj.png';
import yunwei from './img/yunwei.png';
import rgzn from './img/rgzn.png';
import qita from './img/qita.png';
+
//父组件 EducoderLogin.js
class InterestpageComponent extends Component {
constructor(props) {
@@ -65,12 +67,14 @@ class InterestpageComponent extends Component {
})
}
+
+
//跳转然后登入
- Jumptotheinterestpage=(username,password)=>{
+ Jumptotheinterestpage=()=>{
var url = "/accounts/login.json";
axios.post(url, {
- login: username,
- password: password,
+ login: this.props.login,
+ password: this.props.password,
}).then((response) => {
if (response === undefined) {
return
@@ -79,6 +83,7 @@ class InterestpageComponent extends Component {
if (response.data.status === 402) {
window.location.href = response.data.url;
} else {
+ broadcastChannelPostMessage('refreshPage')
this.setState({
isRender: false
})
From 2950466dcececf4c2d3f532d9ebcd7f35be34f62 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 6 Jul 2019 14:57:11 +0800
Subject: [PATCH 2/2] - that.application_list.length
---
public/react/src/modules/courses/members/teacherList.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index 9e20bd64d..b741d6b12 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -37,7 +37,7 @@ function buildColumns(that) {
dataIndex: 'name',
key: 'index',
render: (content, item, index) => {
- return {(that.state.page - 1) * 20 + index + 1}
+ return item.isApply == true ? '' : {(that.state.page - 1) * 20 + index + 1 - that.application_list.length}
}
}
// ,{
@@ -546,6 +546,7 @@ class studentsList extends Component{
const combineArray = teachers.slice(0)
if (page == 1) {
this.state.application_list && this.state.application_list.slice(0).reverse().forEach(item => {
+ item.isApply = true
combineArray.unshift(item)
})
}