issue update
This commit is contained in:
parent
501bf9725f
commit
7ecd3af55b
|
|
@ -190,7 +190,6 @@ class App extends Component {
|
|||
this.unlisten = this.props.history.listen((location,history) => {
|
||||
// if(login && )
|
||||
let newPathname = location.pathname.split('/')[1];
|
||||
console.log("---------------newpathname:",newPathname);
|
||||
if (this.state.pathName !== newPathname) {
|
||||
newPathname && this.getPathnameType(newPathname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 || ''
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
|
||||
}
|
||||
window._debugType = debugType;
|
||||
export function initAxiosInterceptors(props) {
|
||||
|
|
|
|||
|
|
@ -145,17 +145,18 @@ class Setting extends Component {
|
|||
this.setState({
|
||||
loading:true
|
||||
})
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const navUrl = `/${owner}/${projectsId}/project_units.json`;
|
||||
this.update(values);
|
||||
// const { projectsId , owner } = this.props.match.params;
|
||||
// const navUrl = `/${owner}/${projectsId}/project_units.json`;
|
||||
|
||||
let unit = values.project_units.filter(item => (item !== "home" && item!== "activity" && item!== "code"));
|
||||
axios.post(navUrl, {
|
||||
unit_types:unit
|
||||
}).then((result) => {
|
||||
if (result) {
|
||||
this.update(values);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
// let unit = values.project_units.filter(item => (item !== "home" && item!== "activity" && item!== "code"));
|
||||
// axios.post(navUrl, {
|
||||
// unit_types:unit
|
||||
// }).then((result) => {
|
||||
// if (result) {
|
||||
// this.update(values);
|
||||
// }
|
||||
// }).catch(error=>{})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -213,9 +213,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
// 如果处于登录状态,且刚刚打开,那么跳到个人主页
|
||||
// let hrefStr = this.props.match.path === "/login" || this.props.match.path === "/register" || this.props.match.path === "/resetPassword";
|
||||
// console.log("111:",hrefStr,this.props.match.path);
|
||||
// if((this.props.match.path === "/" && this.props.history.length===2)){
|
||||
// this.props.history.push(`/${response.data.login}`)
|
||||
// }
|
||||
if(this.props.match.path === "/"){
|
||||
this.props.history.push(`/${response.data.login}`)
|
||||
}
|
||||
if(!response.data.phone){
|
||||
var supplyCookie = cookie.load('supplyphone');
|
||||
this.setState({
|
||||
|
|
|
|||
Loading…
Reference in New Issue