diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index ad684952d..cd742a178 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -476,7 +476,7 @@ class StudentWorksController < ApplicationController end # 图形效率图的数据 - @echart_data = student_efficiency(@homework, @work) + @echart_data = student_efficiency(@homework, @work) if @work.myshixun end # 实训作品的评阅 diff --git a/app/views/student_works/shixun_work_report.json.jbuilder b/app/views/student_works/shixun_work_report.json.jbuilder index cda78d93c..40b0e28c2 100644 --- a/app/views/student_works/shixun_work_report.json.jbuilder +++ b/app/views/student_works/shixun_work_report.json.jbuilder @@ -3,6 +3,7 @@ json.category @homework.category_info json.course_name @course.name json.work_id @work.id json.work_efficiency @homework.work_efficiency +json.has_commit @work.myshixun.present? if @shixun json.shixun_name @shixun.name # 总体评价 diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index cf78d97e0..e580e7cce 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -745,7 +745,7 @@ class LoginDialog extends Component { frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" 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`}>:""} + 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`}>:""} {weixinlogin===true?
diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js index 9901fc8ad..b549fdeae 100644 --- a/public/react/src/modules/login/Otherloginstart.js +++ b/public/react/src/modules/login/Otherloginstart.js @@ -8,10 +8,12 @@ class Otherloginstart extends Component { componentDidMount() { let query=this.props.location.search; - debugger + if(query!= ""){ const type = query.split('?code='); const types = type[1].split('&state='); + const typeshref = types[1].split(','); + let codeurl = `/auth/wechat/callback.json` axios.get(codeurl,{params:{ code:types[0] @@ -19,13 +21,13 @@ class Otherloginstart extends Component { if(result){ if(result.data.status===0){ if(result.data.new_user===true){ - window.location.href="/otherlogin?type=wechat" + window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`; }else{ // this.getinfo() - if(types[1]==="account"){ - window.location.href="/account/binding" + if(typeshref[1]==="account"){ + window.location.href=`https://${typeshref[1]}/account/binding`; }else{ - window.location.href="/" + window.location.href=`https://${typeshref[1]}`; } } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 41954a3fb..3090dc0dc 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1293,7 +1293,7 @@ class LoginRegisterComponent extends Component { frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" 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`}>:""} + 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`}>:""} {weixinlogin===true?
:""} diff --git a/public/react/src/modules/user/account/AccountBinding.js b/public/react/src/modules/user/account/AccountBinding.js index c1974a746..24032e84e 100644 --- a/public/react/src/modules/user/account/AccountBinding.js +++ b/public/react/src/modules/user/account/AccountBinding.js @@ -242,7 +242,7 @@ class AccountSecure extends Component {