修改资料+密码管理

This commit is contained in:
caishi 2021-06-04 09:43:38 +08:00 committed by caishi
parent dd20d02477
commit e804698d70
3 changed files with 25 additions and 26 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' : 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; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

View File

@ -48,6 +48,7 @@ function Index(props) {
// //
function chooseTime(data) { function chooseTime(data) {
if(data){ if(data){
setPage(1);
setActivityDate(data[0]); setActivityDate(data[0]);
} }
} }

View File

@ -1,6 +1,6 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { Link } from "react-router-dom"; 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 FocusButton from "../UsersList/focus_button";
import axios from "axios"; import axios from "axios";
@ -14,7 +14,10 @@ import './Index.scss';
import Loadable from "react-loadable"; import Loadable from "react-loadable";
import Loading from "../../Loading"; import Loading from "../../Loading";
const UpdateInfo = Loadable({
loader: () => import("./Material/Index"),
loading: Loading,
});
const InfosDevOps = Loadable({ const InfosDevOps = Loadable({
loader: () => import("./devOpsCI"), loader: () => import("./devOpsCI"),
loading: Loading, 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)=>{ change_devops_type=(type)=>{
const {user} = this.state; const {user} = this.state;
this.setState({ this.setState({
@ -209,16 +198,25 @@ class Infos extends Component {
<div className="new-content-flex"> <div className="new-content-flex">
<div className="list-left" style={{border:"none"}}> <div className="list-left" style={{border:"none"}}>
<div className="bgcF"> <div className="bgcF">
<div className="list-l-Menu text-center pd20"> <div className="list-l-Menu text-center" style={{padding:"20px 25px"}}>
<Avatar size={110} src={getImageUrl(`/${user && user.image_url}`)} /> <span className="headimg">
{user && user.user_identity && ( <img src={getImageUrl(`/${user && user.image_url}`)} alt=""/>
<div className="mt-n15 position-relative"> <span>
<Tag color="#FF6E21" style={{marginRight:"0px"}}>{user && user.user_identity}</Tag> {
</div> user && user.gender===1?
)} <i className="iconfont icon-nan"></i>
:
<i className="iconfont icon-nv"></i>
}
</span>
</span>
<div className="text-center mt15 font-16 fwb"> <div className="text-center mt15 font-16 fwb">
{user && user.username} {user && user.username}
</div> </div>
<div className="userDescription">
{user && user.description}
</div>
<div> <div>
{/* {user && current_user && user.login === current_user.login && ( {/* {user && current_user && user.login === current_user.login && (
<div className="user-info-star-button "> <div className="user-info-star-button ">
@ -247,7 +245,7 @@ class Infos extends Component {
</div> </div>
)} )}
</div> </div>
<div className="width100 inline-block mt20"> <div className="focusBox">
<Link <Link
to={`/${user && user.login}/following`} to={`/${user && user.login}/following`}
className={`with50 text-center pull-left ${route_type === "following" ? "text-primary" : ""}`} className={`with50 text-center pull-left ${route_type === "following" ? "text-primary" : ""}`}
@ -278,7 +276,7 @@ class Infos extends Component {
</div> </div>
</div> </div>
<div className="list-right"> <div className="list-right">
{ !route_type && { !route_type && menuKey &&
<Menu selectedKeys={[menuKey]} mode={`horizontal`} className="infosRightMenu"> <Menu selectedKeys={[menuKey]} mode={`horizontal`} className="infosRightMenu">
<Menu.Item key="0"><Link to={`/${user && user.login}`}><i className="iconfont icon-gailan"></i></Link></Menu.Item> <Menu.Item key="0"><Link to={`/${user && user.login}`}><i className="iconfont icon-gailan"></i></Link></Menu.Item>
<Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i></Link></Menu.Item> <Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i></Link></Menu.Item>