调整课堂认证

chromesetting
杨树明 5 years ago
parent 4583530dd1
commit 049bd864ad

@ -20,6 +20,7 @@ import Trialapplicationysl from './modules/login/Trialapplicationysl';
import Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
import AccountProfile from "./modules/user/AccountProfile";
import Accountnewprofile from './modules/user/Accountnewprofile';
import Trialapplication from './modules/login/Trialapplication';
import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import NotFoundPage from './NotFoundPage'
@ -466,6 +467,7 @@ class App extends Component {
<MuiThemeProvider theme={theme}>
<Accountnewprofile {...this.props}{...this.state}/>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={()=>this.Modifyloginvalue()}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>

@ -131,14 +131,14 @@ class CoursesBanner extends Component {
dataqueryss
}).then((result) => {
if(result.data.status===-2){
this.setState({
AccountProfiletype:true,
content:result.data.message,
okText:"立即认证",
cannelText:"稍后认证",
okHref:`/account/certification`,
Accounturltype:true
})
// this.setState({
// AccountProfiletype:true,
// content:result.data.message,
// okText:"立即认证",
// cannelText:"稍后认证",
// okHref:`/account/certification`,
// Accounturltype:true
// })
}else{
if( result!=undefined){
let data = result.data;

@ -0,0 +1,69 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import {Modal} from 'antd';
import axios from 'axios';
class Accountnewprofile extends Component {
constructor(props) {
super(props);
this.state = {
newAccountProfiletype:false
}
}
componentDidMount() {
axios.interceptors.response.use((response) => {
if(response!=undefined)
if (response&&response.data.status === 411) {
this.setState({
newAccountProfiletype:true,
content:response.data.message,
okText:"立即认证",
cannelText:"稍后认证",
okHref:`/account/certification`,
})
}
return response;
}, (error) => {
});
}
gotoback=()=>{
window.location.href="/";
this.setState({
newAccountProfiletype:false
})
}
/**
content: '您需要去完成您的职业认证,才能使用此功能',
okText: '立即完成',
okHref: '/account/certification'
*/
render() {
const { content, okText, okHref,cannelText} = this.state;
return(
<Modal
keyboard={false}
title="提示"
visible={this.state.newAccountProfiletype}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16"> {content}</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.gotoback()}>{cannelText}</a>
<a className="task-btn task-btn-orange" href={ okHref }> {okText}</a>
</div>
</div>
</Modal>
)
}
}
export default Accountnewprofile;
Loading…
Cancel
Save