dev_forum
杨树林 5 years ago
parent 12cd2655a3
commit 359333e8ab

@ -14,6 +14,7 @@ import '@icedesign/base/dist/ICEDesignBase.css';
import '@icedesign/base/index.scss';
import LoginDialog from './modules/login/LoginDialog'
import Notcompletedysl from './modules/user/Notcompletedysl'
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@ -264,6 +265,7 @@ class App extends Component {
<MuiThemeProvider theme={theme}>
<LoginDialog {...this.props} {...this.state}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
{/*{*/}
{/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/}

@ -111,7 +111,6 @@ export function initAxiosInterceptors(props) {
if(response===undefined){
return
}
// locationurl(402);
const config = response.config
if (response.data.status === -1) {
// console.error('error:', response.data.message)
@ -155,10 +154,9 @@ export function initAxiosInterceptors(props) {
}
if (response.data.status === 402) {
debugger
console.log(response.data.status);
console.log(response.data);
locationurl(402);
// locationurl(402);
}

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import {getImageUrl} from 'public/react/src/common/educoder';
import { Modal} from 'antd';
import axios from 'axios';
import '../../modules/user/common.css';

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Modal } from 'antd';
export function SetAppModel(options) {
export function SetAppModel(options={}) {
return function wrap(WrappedComponent) {
return class Wrapper extends Component {
constructor(props) {
@ -9,9 +9,6 @@ export function SetAppModel(options) {
this.state = {
}
console.log("SetAppModel");
console.log("13");
console.log(options);
}
modalCancel=()=>{
window.location.href = "/";
@ -26,7 +23,6 @@ export function SetAppModel(options) {
render() {
const { titlemessage, Modallisttype, Modallist, singleButton } = this.state;
console.log(this.state.Notcompleteds);
return (
<Modal
keyboard={false}
@ -35,7 +31,7 @@ export function SetAppModel(options) {
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
visible={true}
width="530px"
>
<div className="educouddiv">

@ -0,0 +1,722 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import Dialog, {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from 'material-ui/Dialog';
import axios from 'axios';
import {broadcastChannelPostMessage} from 'educoder'
import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd';
//试用申请
class Trialapplicationysl extends Component {
// isRender控制弹出窗口显示
constructor(props) {
super(props)
this.state = {
props: props,
login: "",
Phonenumberisnotcocodes: undefined,
codes: "",
reason: "",
Phonenumberisnotcoreason: undefined,
isRenders: false,
seconds: 60,
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
readonlyInput: true,
user_phone_binded: props.user_phone_binded,
showTrial: false,
user: undefined,
borredss:"bor-reds",
borredssz:"bor-reds fl mr5",
}
//user_phone_binded 判断是否手机号验证
// console.log("Trialapplication");
// console.log(props);
}
Cancel = () => {
this.props.Cancel()
}
componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
// console.log(this.props);
if (nextProps.user != this.props.user) {
// console.log("50");
// console.log(nextProps.user);
if (nextProps.user !== undefined) {
// console.log("53");
// console.log(nextProps.user);
this.setState({
user_phone_binded: nextProps.user.user_phone_binded,
})
}
}
}
//初始化数据
componentDidMount() {
// console.log("53");
//
// console.log(this.props.isRenders);
if (this.props.isRenders != undefined) {
this.setState({
isRenders: this.props.isRenders
})
}
if (this.props.showTrial != undefined) {
// 判断是否返回主页的参数
this.setState({
showTrial: this.props.showTrial
})
}
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 407) {
this.setState({
isRenders: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
//获取登入
loginInputonChange = (e) => {
// console.log(e.target.value);
this.setState({
login: e.target.value,
})
}
//获取申请理由
loginInputonChanges = (e) => {
// console.log(e.target.value);
this.setState({
reason: e.target.value,
Phonenumberisnotcoreason: undefined,
})
}
//获取code
codesonChange = (e) => {
this.setState({
codes: e.target.value,
Phonenumberisnotcocodes: undefined,
})
}
openNotification = (messge) => {
notification.open({
message: "提示",
description:
messge,
onClick: () => {
console.log('Notification Clicked!');
},
});
};
//倒计时
getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.setState({
Phonenumberisnotco: "请输入正确的手机号或邮箱",
})
return
} else {
this.setState({
Phonenumberisnotco: "请输入正确的手机号或邮箱",
})
}
return;
}
if (this.state.getverificationcodes === true) {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
this.SMSverification();
} else {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
this.SMSverification();
}
}
//短信验证
SMSverification = () => {
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: this.state.login,
type: 3,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
}).catch((error) => {
console.log(error);
})
}
handleDialogClose() {
if (this.state.showTrial === false) {
this.setState({
isRenders: false
})
this.Cancel();
window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
}
}
postregistered = () => {
//提交按钮
if (this.state.user_phone_binded === false) {
if (this.state.Phonenumberisnotcobool === false) {
var iphones = "";
if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") {
iphones = "请输入手机号";
} else {
iphones = this.state.Phonenumberisnotco;
}
this.setState({
Phonenumberisnotco: iphones,
})
return;
}
if (this.state.codes.length === 0) {
this.setState({
Phonenumberisnotcocodes: "请输入验证码",
})
return;
}
}
if (this.state.reason.length === 0) {
this.setState({
Phonenumberisnotcoreason: "请输入推荐人信息或申请理由",
})
return;
}
var thiss = this;
var url = "/users/trial_apply.json";
axios.post(url, {
phone: this.state.login,
code: this.state.codes,
reason: this.state.reason,
}).then((result) => {
// console.log(result);
// this.onTabChange("1");
if(result !== undefined){
this.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
// if (this.state.showTrial === false) {
window.location.href = "/";
this.setState({
isRenders: false
})
this.Cancel();
// } else {
// this.setState({
// isRenders: false
// })
// this.Cancel();
//
// }
}
}).catch((error) => {
})
}
inputOnBlur = (e) => {
this.isCorrectname(e.target.value);
// this.Emailphonenumberverification(e.target.value, id);
}
isCorrectname = (value) => {
console.log(value.length);
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
if (!regph.test(value)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
if (!regemail.test(value)) {
if ((value.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
// this.Emailphonenumberverification(value)
return
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
return
}
}
//邮箱手机号验证
Emailphonenumberverification = (value) => {
var url = `/accounts/valid_email_and_phone.json`;
axios.get((url), {
params: {
login: value,
type: 2,
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
}).catch((error) => {
console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
})
}
//执行view
render() {
let {login, codes, reason, isRenders, user_phone_binded,borredss,borredssz, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
// console.log("Trialapplication22222222");
// console.log(this.props);
return (
<div>
{
isRenders === false ? "" :
<div style={{"border-radius": "10px"}}>
<style>
{
`
.dialogBox2{
height: 420px;
}
#DialogIDysl{
/*z-index: 20000; 影响notification*/
}
#DialogIDysl .dialogBox {
width: 560px;
}
.MuiPaper-elevation24-45{
box-shadow:none !important;
}
.MuiPaper-root-19{
/* background:none !important; */
}
.MuiDialog-paper-9{
overflow-y:hidden !important;
}
#log_reg_content{
top: 0px !important;
}
#log_reg_content{
width:400px !important;
border-radius:40px !important;
box-shadow:4px 8px 12px rgba(76,76,76,0.3);
}
.log_nav li{
height:17px;
font-size:18px;
font-family:NotoSansHans-Regular;
color:rgba(25,0,0,1);
line-height: 0px;
}
.vertical-line{
margin-left:10px;
margin-right:10px;
}
#DialogIDysl div {
overflow-y:visible !important;
box-shadow:none !important;
border-radius:10px !important;
}
#wrapper{
position: relative;
top: 3px;
left: 0px;
margin-bottom: 17px;
}
.slidetounlock{
font-size: 12px;
background:-webkit-gradient(linear,left top,right top,color-stop(0,#4d4d4d),color-stop(.4,#4d4d4d),color-stop(.5,#fff),color-stop(.6,#4d4d4d),color-stop(1,#4d4d4d));
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
-webkit-animation:slidetounlock 3s infinite;
-webkit-text-size-adjust:none
}
@-webkit-keyframes slidetounlock{0%{background-position:-200px 0} 100%{background-position:200px 0}}
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/I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AAAABJRU5ErkJggg==") no-repeat center;}
#drag{
position: relative;
background-color: #e8e8e8;
width: 340px;
height: 34px;
line-height: 34px;
text-align: center;
}
#drag .handler{
position: absolute;
top: 0px;
left: 0px;
width: 40px;
height: 32px;
/*border: 1px solid #ccc;*/
cursor: move;
}
#drag .drag_bg{
background-color: #7ac23c;
height: 34px;
width: 0px;
}
#drag .drag_text{
position: absolute;
top: 0px;
width: 340px;
color:#9c9c9c;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
-o-user-select:none;
-ms-user-select:none;
font-size: 12px;
}
#drag{
overflow: hidden !important;
}
#closeIcon{
position: absolute;
top: -30px;
right: -27px;
z-index: 100000;
}
.bluebutton{
width: 100%;
text-align: center;
color: #FFFFff!important;
display: block;
background: #cbcbcb;
height: 45px;
line-height: 45px;
border-radius: 4px;
letter-spacing: 2px;
cursor: pointer;
}
.ant-input {
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
position: relative;
display: inline-block;
padding: 4px 11px;
width: 100%;
height: 38px;
font-size: 14px;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
`
}
</style>
<Input type="text" name="username" value={"namename"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Input type="password" name="password" id="password" value={"123123123"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}}
>
<div id="closeIcon" onClick={() => {
this.handleDialogClose()
}}>
<i className="iconfont icon-shanchudiao"></i>
</div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={
user_phone_binded === true ?
{
"width": "560px", "height": "295px",
"border-radius": "15px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
:
{
"width": "560px", "height": "410px",
"border-radius": "10px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
}
>
<ul style={{"margin-top": "10px","margin-bottom": "10px"}}>
<span style={{
"text-align": "center!important",
"color": "#05101A",
"font-weight": "bold",
"font-size": "17px",
}}>试用申请</span>
</ul>
<div className="log_nav" style={{"width": "100%", "margin-top": "10px"}}></div>
<div style={{"margin-top": "20px"}}>
<span style={{"color": "#4D4D4D"}}> 您尚未获得访问权限请如实填写下述信息</span>
</div>
<div>
<span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span>
</div>
{
user_phone_binded === true ? "" :
<div style={{
"margin-top": "20px", "padding-left": "50px",
"padding-right": "50px"
}}>
<Input placeholder="请输入手机号码" value={login}
onChange={this.loginInputonChange}
onBlur={(e) => this.inputOnBlur(e)}
style={{"height": "38px",}}
className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""}
name="myiphone"
></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotco}</span>
</p>
: <div style={{height: "20px"}}></div>
}
</div>
}
{
user_phone_binded === true ? "" :
<div style={{"display": "flex", "justify-content": "center"}}>
<Input
className={Phonenumberisnotcocodes && Phonenumberisnotcocodes !== ""?borredssz:"fl mr5"}
name="codes" type="text" autoComplete="off"
readonly
onfocus="this.removeAttribute('readonly')" style={{
"width": "316px",
"height": "38px",
}} placeholder="请输入验证码"
onChange={this.codesonChange}
value={codes}>
</Input>
{
getverificationcodes === undefined ?
<Button className="fl ml5 " disabled style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}}
size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ?
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()}
size={"large"}>获取验证码</Button>
:
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()}
size={"large"}>重新发送</Button>
}
</div>
}
{
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red " style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcocodes}</span>
</p>
: <div style={{height: "20px"}}></div>
}
<div style={{
"padding-left": "50px",
"padding-right": "50px"
}}>
<Input placeholder="请在此输入推荐人信息或申请理由" value={reason}
onChange={this.loginInputonChanges}
className={Phonenumberisnotcoreason && Phonenumberisnotcoreason !== ""?borredss:""}
style={{"height": "38px",}}
name="mynames"></Input>
{
Phonenumberisnotcoreason && Phonenumberisnotcoreason !== "" ?
<p className="color-red" style={{width: " 100%", height: "20px",textAlign:"left"}}>
<span >{Phonenumberisnotcoreason}</span>
</p>
: <div style={{height: "20px"}}></div>
}
</div>
<Button type="primary" onClick={() => this.postregistered()}
style={{
"background": "#4cacff!important",
"width": "120px",
"text-align": "center",
"height": "38px",
marginTop: "10px",
}}
size={"large"}>提交申请</Button>
</div>
</div>
</Dialog>
</div>
}
</div>
)
}
}
export default Trialapplicationysl;

@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses';
import LoginDialog from '../login/LoginDialog';
import Trialapplication from '../login/Trialapplication'
import Trialapplicationysl from '../login/Trialapplicationysl'
import 'antd/lib/modal/style/index.css';
@ -629,7 +629,7 @@ submittojoinclass=(value)=>{
{/* />*/}
{/* :""*/}
{/*}*/}
<Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()} ></Trialapplication>
<Trialapplicationysl {...this.state} {...this.props} Cancel={() => this.cancelModulationModels()} ></Trialapplicationysl>
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/">

@ -0,0 +1,70 @@
import React, { Component } from 'react';
import { Modal} from 'antd';
import axios from 'axios';
import '../../modules/user/common.css';
//完善个人资料
class Notcompletedysl extends Component {
constructor(props) {
super(props)
this.state ={
modalsType:false,
}
}
componentDidMount() {
// console.log("Notcompletedysl");
// console.log("开发了402了");
axios.interceptors.response.use((response) => {
// console.log(response);
if (response != undefined)
if (response && response.data.status === 402) {
this.setState({
modalsType: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
modalCancel=()=>{
window.location.href = "/";
}
setDownload=()=>{
window.location.href ='/account/profile';
}
render() {
console.log(this.props)
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.state.modalsType}
width="530px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p>您尚未完善个人资料</p></div>
<div className={"tabeltext-alignleft mt10"}><p>请在完成资料后提交试用申请</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善资料</a>
</div>
</div>
</Modal>
)
}
}
export default Notcompletedysl;
Loading…
Cancel
Save