From e804698d70cf443340d1a8c151d072bc94a7cc6b Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 4 Jun 2021 09:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=96=99+=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 2 +- src/forge/users/GeneralView/Index.jsx | 1 + src/forge/users/Infos.js | 48 +++++++++++++-------------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 36c1529d..73f3a38e 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,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 || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/users/GeneralView/Index.jsx b/src/forge/users/GeneralView/Index.jsx index 8fd8d0a0..24efe37c 100644 --- a/src/forge/users/GeneralView/Index.jsx +++ b/src/forge/users/GeneralView/Index.jsx @@ -48,6 +48,7 @@ function Index(props) { // 在贡献度日历表中选择一个时间 function chooseTime(data) { if(data){ + setPage(1); setActivityDate(data[0]); } } diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 525a2b82..cd33bf13 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import { Link } from "react-router-dom"; -import { Avatar, Tag, Button, Spin , Menu } from "antd"; +import { Button, Spin , Menu } from "antd"; import FocusButton from "../UsersList/focus_button"; import axios from "axios"; @@ -14,7 +14,10 @@ import './Index.scss'; import Loadable from "react-loadable"; import Loading from "../../Loading"; - +const UpdateInfo = Loadable({ + loader: () => import("./Material/Index"), + loading: Loading, +}); const InfosDevOps = Loadable({ loader: () => import("./devOpsCI"), loading: Loading, @@ -134,20 +137,6 @@ class Infos extends Component { }) } - // change_project_type = (type) => { - // const {user} = this.state - // this.setState({ - // project_type: type , - // route_type: undefined - // }) - // let url = `/users/${user && user.login}` - // if (type){ - // url = `/users/${user && user.login}/projects/${type}` - // } - // this.props.history.push(url) - - // }; - change_devops_type=(type)=>{ const {user} = this.state; this.setState({ @@ -209,16 +198,25 @@ class Infos extends Component {