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

issues25489
杨树林 5 years ago
commit 9db8e51eb3

@ -476,7 +476,7 @@ class StudentWorksController < ApplicationController
end end
# 图形效率图的数据 # 图形效率图的数据
@echart_data = student_efficiency(@homework, @work) @echart_data = student_efficiency(@homework, @work) if @work.myshixun
end end
# 实训作品的评阅 # 实训作品的评阅

@ -3,6 +3,7 @@ json.category @homework.category_info
json.course_name @course.name json.course_name @course.name
json.work_id @work.id json.work_id @work.id
json.work_efficiency @homework.work_efficiency json.work_efficiency @homework.work_efficiency
json.has_commit @work.myshixun.present?
if @shixun if @shixun
json.shixun_name @shixun.name json.shixun_name @shixun.name
# 总体评价 # 总体评价

@ -745,7 +745,7 @@ class LoginDialog extends Component {
frameBorder="0" frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix "> {weixinlogin===true?<p className="clearfix ">

@ -8,10 +8,12 @@ class Otherloginstart extends Component {
componentDidMount() { componentDidMount() {
let query=this.props.location.search; let query=this.props.location.search;
debugger
if(query!= ""){ if(query!= ""){
const type = query.split('?code='); const type = query.split('?code=');
const types = type[1].split('&state='); const types = type[1].split('&state=');
const typeshref = types[1].split(',');
let codeurl = `/auth/wechat/callback.json` let codeurl = `/auth/wechat/callback.json`
axios.get(codeurl,{params:{ axios.get(codeurl,{params:{
code:types[0] code:types[0]
@ -19,13 +21,13 @@ class Otherloginstart extends Component {
if(result){ if(result){
if(result.data.status===0){ if(result.data.status===0){
if(result.data.new_user===true){ if(result.data.new_user===true){
window.location.href="/otherlogin?type=wechat" window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`;
}else{ }else{
// this.getinfo() // this.getinfo()
if(types[1]==="account"){ if(typeshref[1]==="account"){
window.location.href="/account/binding" window.location.href=`https://${typeshref[1]}/account/binding`;
}else{ }else{
window.location.href="/" window.location.href=`https://${typeshref[1]}`;
} }
} }

@ -1293,7 +1293,7 @@ class LoginRegisterComponent extends Component {
frameBorder="0" frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix mb20 textcenter"> {weixinlogin===true?<p className="clearfix mb20 textcenter">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a> <a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a>
</p>:""} </p>:""}

@ -242,7 +242,7 @@ class AccountSecure extends Component {
<Form> <Form>
{list.map((item,key)=>{ {list.map((item,key)=>{
if(item.en_type!="qq"){
return( return(
<div className="flexTable" key={key}> <div className="flexTable" key={key}>
<div className="flexTable"> <div className="flexTable">
@ -258,9 +258,9 @@ class AccountSecure extends Component {
<div className="status pt19"> <div className="status pt19">
{item.en_type!="qq"?<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""} {item.en_type!="qq"?<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={ onClick={
item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id) item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
} }
>{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""} >{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={ onClick={
item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id) item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id)
@ -271,6 +271,7 @@ class AccountSecure extends Component {
</div> </div>
</div> </div>
) )
}
}) })
} }
@ -297,7 +298,7 @@ class AccountSecure extends Component {
frameBorder="0" frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe> src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,${window.location.host}#wechat_redirect`}></iframe>
<p className="clearfix pagemancenter"> <p className="clearfix pagemancenter">
<a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a> <a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a>
</p> </p>

Loading…
Cancel
Save