diff --git a/src/AppConfig.js b/src/AppConfig.js
index e87c10bdf..cf7fe8b6a 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -2,7 +2,6 @@ import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage, isDev, queryString } from 'educoder';
import { notification } from 'antd';
-import cookie from 'react-cookies';
import './index.css';
@@ -17,7 +16,7 @@ function locationurl(list) {
}
}
// TODO 开发期多个身份切换
-let debugType = "";
+let debugType = ""
if (isDev) {
const _search = window.location.search;
let parsed = {};
@@ -26,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
- window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
+ window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
@@ -70,7 +69,7 @@ export function initAxiosInterceptors(props) {
if (response.data.status === -1) {
if (window.location.pathname.startsWith('/tasks/')) {
props.showSnackbar(response.data.message || '服务器异常,请联系管理员。')
- } else if(window.location.pathname.startsWith('/login') || window.location.pathname.startsWith('/register') || window.location.pathname.startsWith('/resetPassword') || window.location.pathname.indexOf("/bindlogin/")>-1) {
+ } else if(window.location.pathname.startsWith('/login') || window.location.pathname.startsWith('/register') || window.location.pathname.startsWith('/resetPassword')) {
return response;
} else {
notification.open({
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index a703597a1..79b793a08 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -142,8 +142,6 @@ class Infos extends Component {
});
const { current_user } = this.props;
const { username } = this.props.match.params;
- const { pathname } = this.props.location;
- const { notice } = this.state;
let url = `/users/${username || (current_user && current_user.login)}.json`;
axios.get(url).then((result) => {
@@ -461,7 +459,7 @@ class Infos extends Component {
{
- return ;
+ return ;
}}
>
{/* {
- if(current_user && current_user.super_description){
- setDescription(current_user.super_description);
- setCopyDescription(current_user.super_description);
+ if(user && user.super_description){
+ setDescription(user.super_description);
+ setCopyDescription(user.super_description);
setShowEdit(true);
}
- },[current_user && current_user.super_description])
+ },[user && user.super_description])
function onContentChange(value){
setDescription(value);
@@ -52,7 +51,7 @@ function Personal(props){
setCopyDescription(description);
setEdit(false);
setShowEdit(description ?true :false);
- resetUserInfo && resetUserInfo();
+ generalFetchUser && generalFetchUser();
}
})
}
diff --git a/src/modules/user/usersInfo/InfosTopics.js b/src/modules/user/usersInfo/InfosTopics.js
index 56820fa4a..d80bb0700 100644
--- a/src/modules/user/usersInfo/InfosTopics.js
+++ b/src/modules/user/usersInfo/InfosTopics.js
@@ -1,9 +1,6 @@
import React, { Component } from 'react';
-import { SnackbarHOC } from 'educoder';
-import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
-import {Tooltip,Menu,Pagination,Spin, Dropdown,Checkbox} from 'antd';
+import {Menu,Pagination,Spin, Dropdown,Checkbox} from 'antd';
import axios from 'axios';
-import {getImageUrl,WordsBtn} from 'educoder';
import moment from 'moment';
import Modals from '../../modals/Modals';
import SendTopics from '../../modals/SendTopics'
@@ -313,12 +310,6 @@ class InfosTopics extends Component{
let user_type=this.props.current_user&&this.props.current_user.user_identity;
let targetuserid=this.props.data&&this.props.data.id;
-
-
- // console.log(is_current)
- // console.log(current_user)
- // console.log(current_user.is_teacher)
- // console.log(current_user.admin)
const menu = (