Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
daiao 6 years ago
commit cd32ece4f2

@ -11,10 +11,11 @@
float: left; float: left;
width: 97px;} width: 97px;}
.head-nav{ .head-nav{
float: left;
text-align: center; text-align: center;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
min-width: 1000px; min-width: 1200px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

@ -20,16 +20,16 @@ function locationurl(list){
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
let debugType ="" let debugType =""
// if (isDev) { if (isDev) {
// const _search = window.location.search; const _search = window.location.search;
// let parsed = {}; let parsed = {};
// if (_search) { if (_search) {
// parsed = queryString.parse(_search); parsed = queryString.parse(_search);
// } }
// 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 || 'admin'
// } }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

@ -102,6 +102,8 @@ class LoginDialog extends Component {
authCodeclass:'log-botton mt5', authCodeclass:'log-botton mt5',
isRender: false, isRender: false,
MyEduCoderModals:false, MyEduCoderModals:false,
Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false,
}; };
} }
@ -112,26 +114,103 @@ class LoginDialog extends Component {
register=(num) =>{ register=(num) =>{
this.setState({login:1,speedy:num,dialogBox:'dialogBox2'}); this.setState({login:1,speedy:num,dialogBox:'dialogBox2'});
} }
inputOnBlur = (e, id) => {
loginChange = () =>{ this.Emailphonenumberverification(e.target.value, 1);
let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; };
let reg1 = /^1\d{10}$/; // 输入页面
let reg2=/^[a-zA-z]\w{3,14}$/; loginChange = (e) =>{
// let reg3=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/; var stirngt="";
let value=this.refs.loginPassText.value; if(e.target.value.length>0){
let valuenum= value.length; var str= e.target.value.replace(/\s*/g,"")
if(valuenum>0){ stirngt=str;
if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ }else{
this.setState({regular:1}) stirngt= e.target.value;
return }
}else{
this.setState({loginValue:value}) if (e.target.value.length === 0) {
this.setState({regular:0}) this.setState({
loginValue: stirngt,
Phonenumberisnotco:undefined,
})
}else{
this.setState({
loginValue: stirngt,
Phonenumberisnotco:undefined,
})
}
// let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;
// let reg1 = /^1\d{10}$/;
// let reg2=/^[a-zA-z]\w{3,14}$/;
// // let reg3=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
// let value=this.refs.loginPassText.value;
// let valuenum= value.length;
// if(valuenum>0){
// if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){
// this.setState({regular:1})
// return
// }else{
// // this.setState({loginValue:value});
// this.setState({regular:0});
// var stirngt;
// if(value.length>0){
// var str= value.replace(/\s*/g,"")
// stirngt=str;
// }else{
// stirngt= value;
// }
// this.setState({
// loginValue:stirngt,
// });
// }
// }else{
// this.setState({loginValue:value});
// var stirngt;
// if(value.length>0){
// var str= value.replace(/\s*/g,"")
// stirngt=str;
// }else{
// stirngt= value;
// }
// this.setState({
// loginValue:stirngt,
// });
// }
};
//邮箱手机号验证
Emailphonenumberverification = (value, id) => {
var url = `/accounts/valid_email_and_phone.json`;
axios.get((url), {
params: {
login: value,
type: 1,
}
}).then((result) => {
if(result){
if(result.data.status===-2){
if(result.data.message==="该手机号码或邮箱已被注册"){
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
}else {
this.setState({
Phonenumberisnotco: result.data.message,
Phonenumberisnotcobool: true,
})
}
return;
}else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
} }
}else{
this.setState({loginValue:value})
} }
} }).catch((error) => {
})
};
passwordChange = () =>{ passwordChange = () =>{
let value =this.refs.passwordText.value; let value =this.refs.passwordText.value;
@ -411,7 +490,7 @@ class LoginDialog extends Component {
window.location.href = url; window.location.href = url;
}; };
render() { render() {
let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state;
if (isRender === undefined) { if (isRender === undefined) {
@ -457,11 +536,13 @@ class LoginDialog extends Component {
id="name_loggin_input" id="name_loggin_input"
ref="loginPassText" ref="loginPassText"
onInput={this.loginChange} onInput={this.loginChange}
onBlur={(e) => this.inputOnBlur(e, 1)}
value={this.state.loginValue}
name="username" name="username"
placeholder="请输入有效的手机号/邮箱号" ></input> placeholder="请输入有效的手机号/邮箱号" ></input>
<div style={{height: '25px'}}><p className="color-orange edu-txt-left none" id="username_error_notice" <div style={{height: '25px'}}><p className="color-orange edu-txt-left none" id="username_error_notice"
style={{display: regular==0?'none':'block'}}>请输入有效的手机号/邮箱号</p></div> style={{display: Phonenumberisnotco===undefined?'none':'block'}}>{Phonenumberisnotco}</p></div>
<div> <div>
<input type="password" id="password_loggin_input" <input type="password" id="password_loggin_input"

@ -713,68 +713,68 @@ submittojoinclass=(value)=>{
><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>工程认证</a></li> ><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>工程认证</a></li>
</ul> </ul>
<style>
{ </div>
` </div>
<style>
{
`
.posi-searchs{ .posi-searchs{
opacity: 1; opacity: 1;
position: absolute; position: absolute;
top: -2px; top: -2px;
background: #fff; background: #fff;
z-index: 2; z-index: 2;
right: -241px; right: 185px;
} }
` `
} }
</style> </style>
<div className="posi-searchs" > <div className="posi-searchs" >
<div className="search-all clearfix"> <div className="search-all clearfix">
{/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/} {/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/}
<div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}> <div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}>
<input type="hidden" id="search_type" value="1"></input> <input type="hidden" id="search_type" value="1"></input>
<span className="searchkey">实训</span> <span className="searchkey">实训</span>
<i className="fa fa-angle-down ml5 font-16"></i> <i className="fa fa-angle-down ml5 font-16"></i>
<ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}> <ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}>
<li><a>实训</a></li> <li><a>实训</a></li>
<li><a>课堂</a></li> <li><a>课堂</a></li>
<li><a>用户</a></li> <li><a>用户</a></li>
</ul> </ul>
</div> </div>
{/*<input type="text" className="search-input fl" id="search-input" */} {/*<input type="text" className="search-input fl" id="search-input" */}
{/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/} {/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/}
{/*搜索框*/} {/*搜索框*/}
{showSearchOpentype===true?<div {showSearchOpentype===true?<div
className={"HeaderSearch"} className={"HeaderSearch"}
onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
<Search <Search
id={"HeaderSearchs"} id={"HeaderSearchs"}
placeholder="实践课程/翻转课堂/开发社区/交流问答" placeholder="实践课程/翻转课堂/开发社区/交流问答"
onInput={()=>this.onKeywordSearchKeyDowns()} onInput={()=>this.onKeywordSearchKeyDowns()}
onSearch={(value) => this.onKeywordSearchKeyDown(value)} onSearch={(value) => this.onKeywordSearchKeyDown(value)}
// onPressEnter={this.onKeywordSearchKeyDown} // onPressEnter={this.onKeywordSearchKeyDown}
style={{ width: 300,height:32}} style={{ width: 300,height:32}}
autoFocus={true} autoFocus={true}
/> />
</div>:""} </div>:""}
{/*<a className="search-icon fl" id="header_keyword_search" onClick={this.onKeywordSearch}>*/} {/*<a className="search-icon fl" id="header_keyword_search" onClick={this.onKeywordSearch}>*/}
{/*/!*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*!/*/} {/*/!*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*!/*/}
{/*<i className="iconfont icon-sousuo color-blue"></i>*/} {/*<i className="iconfont icon-sousuo color-blue"></i>*/}
{/*</a>*/} {/*</a>*/}
{/* TODO {/* TODO
<div className="search-content none" style="width: 86%;left: 0px;"> <div className="search-content none" style="width: 86%;left: 0px;">
<div className="search-title">最近搜索</div> <div className="search-title">最近搜索</div>
<div><a href="javascript:void(0)" className="search_history">绿盟</a></div> <div><a href="javascript:void(0)" className="search_history">绿盟</a></div>
<div><a href="javascript:void(0)" className="search_history">qwe</a></div> <div><a href="javascript:void(0)" className="search_history">qwe</a></div>
</div>*/} </div>*/}
</div> </div>
</div>
</div>
</div> </div>
{/*<span className="font-15 fr mt17"> {/*<span className="font-15 fr mt17">
<%= link_to '登录', signin_path, :className => "mr5" %> <%= link_to '登录', signin_path, :className => "mr5" %>
<em className="vertical-line"></em> <em className="vertical-line"></em>

@ -20,7 +20,7 @@ const versionNum = '0001';
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ if(window.location.port === "3007"){
_url_origin="https://newweb.educoder.net"; _url_origin="http://47.96.87.25:48080/";
} }
// let _url_origin=`https://www.educoder.net`; // let _url_origin=`https://www.educoder.net`;

@ -547,7 +547,7 @@ class LoginRegisterComponent extends Component {
}).catch((error) => { }).catch((error) => {
}) })
} };
//短信验证 //短信验证
SMSverification = () => { SMSverification = () => {
var url = `/accounts/get_verification_code.json`; var url = `/accounts/get_verification_code.json`;

@ -15,7 +15,7 @@
text-align: center; text-align: center;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
min-width: 1000px; min-width: 1200px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

Loading…
Cancel
Save