diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js
index 003724ede..65284d0f8 100644
--- a/public/react/src/modules/home/shixunsHome.js
+++ b/public/react/src/modules/home/shixunsHome.js
@@ -123,7 +123,7 @@ class ShixunsHome extends Component {
{/*懒加载*/}
-
+ {/* */}
diff --git a/public/react/src/modules/tpm/NewFooter.js b/public/react/src/modules/tpm/NewFooter.js
index 7f8cd502c..a85b35ccf 100644
--- a/public/react/src/modules/tpm/NewFooter.js
+++ b/public/react/src/modules/tpm/NewFooter.js
@@ -16,7 +16,8 @@ class NewFooter extends Component {
render() {
return (
-
+
+ {/*newContainers*/}
{/*
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index d197bc9c4..6b435b619 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -649,9 +649,11 @@ submittojoinclass=(value)=>{
{...this.state}
{...this.props}
/>:""}
-
+
+
+
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
@@ -770,6 +772,8 @@ submittojoinclass=(value)=>{
+
+
{/*
<%= link_to '登录', signin_path, :className => "mr5" %>
@@ -786,7 +790,7 @@ submittojoinclass=(value)=>{
注册
:
-
+
}
{/*href="https://www.educoder.net/login"*/}
-
+
);
diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css
index 1eb60bee8..0e2720b01 100644
--- a/public/react/src/modules/tpm/TPMIndex.css
+++ b/public/react/src/modules/tpm/TPMIndex.css
@@ -200,4 +200,8 @@ body>.-task-title {
.HeaderSearch{
width: 325px;
+}
+.mainheighs{
+ height: 100%;
+ display: block;
}
\ No newline at end of file
diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js
index e50d162a6..53d9b3509 100644
--- a/public/react/src/modules/user/Notcompletedysl.js
+++ b/public/react/src/modules/user/Notcompletedysl.js
@@ -52,7 +52,7 @@ class Notcompletedysl extends Component {
render() {
- console.log(this.props)
+ // console.log(this.props)
return(
Date: Mon, 29 Jul 2019 16:16:17 +0800
Subject: [PATCH 11/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/user/LoginRegisterComponent.js | 111 +++++++++---------
1 file changed, 57 insertions(+), 54 deletions(-)
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index ff03b11ea..5b5250004 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -678,60 +678,63 @@ class LoginRegisterComponent extends Component {
}
//失去焦点判断
inputOnBlur = (e, id) => {
- // this.isCorrectname(e.target.value, id);
- // this.Emailphonenumberverification(e.target.value, id);
- if (e.target.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(e.target.value)) {
- stringdata = "手机号格式不正确";
- this.setState({
- Phonenumberisnotco: stringdata,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- } else {
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- })
- return
- }
-
- if (!regemail.test(e.target.value)) {
- if ((e.target.value.indexOf("@") != -1) === true) {
- stringdata = "邮箱格式不正确";
- } else {
- stringdata = "手机号格式不正确";
-
- }
- this.setState({
- Phonenumberisnotco: stringdata,
- Phonenumberisnotcobool: true,
- dragOk:false,
- Whethertoverify:this.state.Whethertoverify===true?false:true,
- })
- return
- } else {
- this.setState({
- Phonenumberisnotco: undefined,
- Phonenumberisnotcobool: false,
- })
- this.Emailphonenumberverification(e.target.value, 1);
- return
- }
+ // debugger
+ // // this.isCorrectname(e.target.value, id);
+ // // this.Emailphonenumberverification(e.target.value, id);
+ // if (e.target.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(e.target.value)) {
+ // stringdata = "手机号格式不正确";
+ // this.setState({
+ // Phonenumberisnotco: stringdata,
+ // Phonenumberisnotcobool: true,
+ // dragOk:false,
+ // Whethertoverify:this.state.Whethertoverify===true?false:true,
+ // })
+ // } else {
+ // console.log("706");
+ // this.setState({
+ // Phonenumberisnotco: undefined,
+ // Phonenumberisnotcobool: false,
+ // })
+ // return
+ // }
+ //
+ // if (!regemail.test(e.target.value)) {
+ // if ((e.target.value.indexOf("@") != -1) === true) {
+ // stringdata = "邮箱格式不正确";
+ // } else {
+ // stringdata = "手机号格式不正确";
+ //
+ // }
+ // this.setState({
+ // Phonenumberisnotco: stringdata,
+ // Phonenumberisnotcobool: true,
+ // dragOk:false,
+ // Whethertoverify:this.state.Whethertoverify===true?false:true,
+ // })
+ // return
+ // } else {
+ // console.log("729");
+ // this.setState({
+ // Phonenumberisnotco: undefined,
+ // Phonenumberisnotcobool: false,
+ // })
+ // this.Emailphonenumberverification(e.target.value, 1);
+ // return
+ // }
this.Emailphonenumberverification(e.target.value, 1);
}
inputOnBlurzhuche = (e, id) => {
From 6fae1b8f5832e684e29ec6e798293b5ae57a3990 Mon Sep 17 00:00:00 2001
From: p31729568
Date: Mon, 29 Jul 2019 16:29:30 +0800
Subject: [PATCH 12/35] fix elasticsearch title not highlight bug
---
app/services/concerns/elasticsearch_able.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/services/concerns/elasticsearch_able.rb b/app/services/concerns/elasticsearch_able.rb
index c1640470c..e93f9c537 100644
--- a/app/services/concerns/elasticsearch_able.rb
+++ b/app/services/concerns/elasticsearch_able.rb
@@ -22,6 +22,7 @@ module ElasticsearchAble
fragment_size: EduSetting.get('es_highlight_fragment_size') || 30,
tag: '',
fields: {
+ name: { type: 'plain' },
challenge_names: { type: 'plain' },
challenge_tag_names: { type: 'plain' },
description: { type: 'plain' },
From 6934b3e00625020cc9cdc4290ac55c49a3e1c8b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 16:37:16 +0800
Subject: [PATCH 13/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 22 +++++++++++-----------
public/react/src/modules/tpm/TPMIndex.css | 4 ++++
public/stylesheets/educoder/edu-all.css | 1 +
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 363ff495d..4928b525f 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -20,16 +20,16 @@ function locationurl(list){
// TODO 开发期多个身份切换
let debugType =""
-if (isDev) {
- const _search = window.location.search;
- let parsed = {};
- if (_search) {
- parsed = queryString.parse(_search);
- }
- debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
- window.location.search.indexOf('debug=s') != -1 ? 'student' :
- window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
-}
+// if (isDev) {
+// const _search = window.location.search;
+// let parsed = {};
+// if (_search) {
+// parsed = queryString.parse(_search);
+// }
+// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
+// window.location.search.indexOf('debug=s') != -1 ? 'student' :
+// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
+// }
window._debugType = debugType;
export function initAxiosInterceptors(props) {
@@ -41,7 +41,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
// proxy = "https://testeduplus2.educoder.net"
- proxy="http://47.96.87.25:48080"
+ proxy="http://47.96.87.25:48080/"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css
index 0e2720b01..2f6eccfd6 100644
--- a/public/react/src/modules/tpm/TPMIndex.css
+++ b/public/react/src/modules/tpm/TPMIndex.css
@@ -204,4 +204,8 @@ body>.-task-title {
.mainheighs{
height: 100%;
display: block;
+}
+
+.ml18a{
+ margin-left:18%;
}
\ No newline at end of file
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 5ab2dc0ad..29fa6f5dc 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -11,6 +11,7 @@
float: left;
width: 97px;}
.head-nav{
+ float: left;
text-align: center;
height: 60px;
box-sizing: border-box;
From f8c2316569b4a2be642f5a666cbe4de56377ea44 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 16:41:09 +0800
Subject: [PATCH 14/35] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...n_for_users.rb => 20190729080935_modify_login_for_users.rb} | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
rename db/migrate/{20190729080934_modify_login_for_users.rb => 20190729080935_modify_login_for_users.rb} (50%)
diff --git a/db/migrate/20190729080934_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb
similarity index 50%
rename from db/migrate/20190729080934_modify_login_for_users.rb
rename to db/migrate/20190729080935_modify_login_for_users.rb
index 96fb9f1d1..a4a7d3f51 100644
--- a/db/migrate/20190729080934_modify_login_for_users.rb
+++ b/db/migrate/20190729080935_modify_login_for_users.rb
@@ -2,7 +2,8 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
def change
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
- use.update_column(:login, use.login.strip)
+ use.update_attributes(:login, use.login.strip, phone: user.phone.try(:strip))
+ use.user_extension.update_column(:student_id,use.user_extension.student_id.try(:strip))
end
end
end
From 5ac943821bc5b7a4cb8424e22b9587510d2b232b Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 16:43:54 +0800
Subject: [PATCH 15/35] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190729080935_modify_login_for_users.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb
index a4a7d3f51..e8beb49fe 100644
--- a/db/migrate/20190729080935_modify_login_for_users.rb
+++ b/db/migrate/20190729080935_modify_login_for_users.rb
@@ -2,7 +2,7 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
def change
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
- use.update_attributes(:login, use.login.strip, phone: user.phone.try(:strip))
+ use.update_attributes(:login, use.login.strip, phone: use.phone.try(:strip))
use.user_extension.update_column(:student_id,use.user_extension.student_id.try(:strip))
end
end
From db84d635b5c2183f2d0ddbc4dd8dc2cf7e14f4b3 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 16:46:13 +0800
Subject: [PATCH 16/35] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190729080935_modify_login_for_users.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb
index e8beb49fe..274e163de 100644
--- a/db/migrate/20190729080935_modify_login_for_users.rb
+++ b/db/migrate/20190729080935_modify_login_for_users.rb
@@ -2,8 +2,8 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
def change
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
- use.update_attributes(:login, use.login.strip, phone: use.phone.try(:strip))
- use.user_extension.update_column(:student_id,use.user_extension.student_id.try(:strip))
+ use.update_attributes(login: use.login.strip, phone: use.phone.try(:strip))
+ use.user_extension.update_column(:student_id, use.user_extension.student_id.try(:strip))
end
end
end
From d62aff64528ea821c4c8932cd619a37a3f17f055 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 16:49:19 +0800
Subject: [PATCH 17/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 3 +-
public/react/src/AppConfig.js | 20 ++--
public/react/src/modules/tpm/NewHeader.js | 104 ++++++++++----------
public/react/src/modules/tpm/TPMIndexHOC.js | 2 +-
public/stylesheets/educoder/edu-all.css | 2 +-
5 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index 4eeb5497c..f58d44978 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -11,10 +11,11 @@
float: left;
width: 97px;}
.head-nav{
+ float: left;
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 1000px;
+ min-width: 1200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 4928b525f..2ad7df0d5 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -20,16 +20,16 @@ function locationurl(list){
// TODO 开发期多个身份切换
let debugType =""
-// if (isDev) {
-// const _search = window.location.search;
-// let parsed = {};
-// if (_search) {
-// parsed = queryString.parse(_search);
-// }
-// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
-// window.location.search.indexOf('debug=s') != -1 ? 'student' :
-// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
-// }
+if (isDev) {
+ const _search = window.location.search;
+ let parsed = {};
+ if (_search) {
+ parsed = queryString.parse(_search);
+ }
+ debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
+ window.location.search.indexOf('debug=s') != -1 ? 'student' :
+ window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
+}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 6b435b619..f4a90fd81 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -713,68 +713,68 @@ submittojoinclass=(value)=>{
>工程认证
-
-
-
- {/**/}
-
- {/*
*/}
- {/*搜索框*/}
- {showSearchOpentype===true?
this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
-
:""}
-
- {/**/}
- {/* TODO 需要服务端接口提供最近搜索
+ }
+
+
+
+ {/**/}
+
+ {/*
*/}
+ {/*搜索框*/}
+ {showSearchOpentype===true?
this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
+
:""}
+
+ {/**/}
+ {/* TODO 需要服务端接口提供最近搜索
*/}
-
-
-
-
+
-
{/*
<%= link_to '登录', signin_path, :className => "mr5" %>
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index e092c17d4..0cf22376f 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -20,7 +20,7 @@ const versionNum = '0001';
// let _url_origin = getUrl()
let _url_origin='';
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`;
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 29fa6f5dc..6c77ee1c5 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 1000px;
+ min-width: 1200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From 3674e0509cb75265a80b11ca65a7e0b67261a498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 29 Jul 2019 16:50:01 +0800
Subject: [PATCH 18/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/login/LoginDialog.js | 121 +++++++++++++++---
.../modules/user/LoginRegisterComponent.js | 2 +-
2 files changed, 102 insertions(+), 21 deletions(-)
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js
index 2db1929b9..58cd9b7fb 100644
--- a/public/react/src/modules/login/LoginDialog.js
+++ b/public/react/src/modules/login/LoginDialog.js
@@ -102,6 +102,8 @@ class LoginDialog extends Component {
authCodeclass:'log-botton mt5',
isRender: false,
MyEduCoderModals:false,
+ Phonenumberisnotco:undefined,
+ Phonenumberisnotcobool:false,
};
}
@@ -112,26 +114,103 @@ class LoginDialog extends Component {
register=(num) =>{
this.setState({login:1,speedy:num,dialogBox:'dialogBox2'});
}
-
- loginChange = () =>{
- 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})
+ inputOnBlur = (e, id) => {
+ this.Emailphonenumberverification(e.target.value, 1);
+ };
+ // 输入页面
+ loginChange = (e) =>{
+ var stirngt="";
+ if(e.target.value.length>0){
+ var str= e.target.value.replace(/\s*/g,"")
+ stirngt=str;
+ }else{
+ stirngt= e.target.value;
+ }
+
+ if (e.target.value.length === 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 = () =>{
let value =this.refs.passwordText.value;
@@ -411,7 +490,7 @@ class LoginDialog extends Component {
window.location.href = url;
};
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;
if (isRender === undefined) {
@@ -457,11 +536,13 @@ class LoginDialog extends Component {
id="name_loggin_input"
ref="loginPassText"
onInput={this.loginChange}
+ onBlur={(e) => this.inputOnBlur(e, 1)}
+ value={this.state.loginValue}
name="username"
placeholder="请输入有效的手机号/邮箱号" >
+ style={{display: Phonenumberisnotco===undefined?'none':'block'}}>{Phonenumberisnotco}
{
})
- }
+ };
//短信验证
SMSverification = () => {
var url = `/accounts/get_verification_code.json`;
From e83ba51d931dfcf6a46939ce5ee52edacaf56082 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 16:54:19 +0800
Subject: [PATCH 19/35] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/searchable/dependents/user.rb | 2 +-
db/migrate/20190729080935_modify_login_for_users.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/models/searchable/dependents/user.rb b/app/models/searchable/dependents/user.rb
index f6dcaa430..bb55d0530 100644
--- a/app/models/searchable/dependents/user.rb
+++ b/app/models/searchable/dependents/user.rb
@@ -8,7 +8,7 @@ module Searchable::Dependents::User
private
def check_searchable_dependents
- if firstname_previously_changed? || lastname_previously_changed? || user_extension.school_id_previously_changed?
+ if firstname_previously_changed? || lastname_previously_changed? || user_extension&.school_id_previously_changed?
# reindex shixun
created_shixuns.each(&:reindex)
diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb
index 274e163de..335079a06 100644
--- a/db/migrate/20190729080935_modify_login_for_users.rb
+++ b/db/migrate/20190729080935_modify_login_for_users.rb
@@ -2,8 +2,8 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
def change
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
- use.update_attributes(login: use.login.strip, phone: use.phone.try(:strip))
- use.user_extension.update_column(:student_id, use.user_extension.student_id.try(:strip))
+ use.update_attributes(login: use.login&.strip, phone: use.phone&.strip)
+ use.user_extension.update_column(:student_id, use.user_extension&.student_id&.strip)
end
end
end
From b8f010217604c42148d589eae56804e0a59816f2 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 16:56:04 +0800
Subject: [PATCH 20/35] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190729080935_modify_login_for_users.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb
index 335079a06..60e5e0964 100644
--- a/db/migrate/20190729080935_modify_login_for_users.rb
+++ b/db/migrate/20190729080935_modify_login_for_users.rb
@@ -3,7 +3,7 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2]
users = User.where("created_on > '2019-07-26 19:00:00'")
users.find_each do |use|
use.update_attributes(login: use.login&.strip, phone: use.phone&.strip)
- use.user_extension.update_column(:student_id, use.user_extension&.student_id&.strip)
+ use.user_extension.update_column(:student_id, use.user_extension&.student_id&.strip) if use.user_extension
end
end
end
From 35a25aaf8b0df84eca7d7e7abc0d384b23550ff0 Mon Sep 17 00:00:00 2001
From: p31729568
Date: Mon, 29 Jul 2019 16:10:54 +0800
Subject: [PATCH 21/35] apply join project api
---
app/controllers/projects/base_controller.rb | 5 ++
.../projects/project_applies_controller.rb | 14 ++++
app/jobs/apply_join_project_notify_job.rb | 31 +++++++
app/models/applied_project.rb | 9 ++
app/models/forge_activity.rb | 5 ++
app/models/member.rb | 6 +-
app/models/member_role.rb | 1 +
app/models/project.rb | 3 +
app/models/role.rb | 3 +
app/models/user.rb | 3 +
app/models/user_grade.rb | 4 +
app/services/projects/apply_join_service.rb | 82 +++++++++++++++++++
app/services/projects/join_service.rb | 35 ++++++++
config/routes.rb | 4 +
14 files changed, 203 insertions(+), 2 deletions(-)
create mode 100644 app/controllers/projects/base_controller.rb
create mode 100644 app/controllers/projects/project_applies_controller.rb
create mode 100644 app/jobs/apply_join_project_notify_job.rb
create mode 100644 app/models/applied_project.rb
create mode 100644 app/models/forge_activity.rb
create mode 100644 app/models/role.rb
create mode 100644 app/models/user_grade.rb
create mode 100644 app/services/projects/apply_join_service.rb
create mode 100644 app/services/projects/join_service.rb
diff --git a/app/controllers/projects/base_controller.rb b/app/controllers/projects/base_controller.rb
new file mode 100644
index 000000000..d874b4759
--- /dev/null
+++ b/app/controllers/projects/base_controller.rb
@@ -0,0 +1,5 @@
+class Projects::BaseController < ApplicationController
+ include PaginateHelper
+
+ before_action :require_login, :check_auth
+end
diff --git a/app/controllers/projects/project_applies_controller.rb b/app/controllers/projects/project_applies_controller.rb
new file mode 100644
index 000000000..37d9d615e
--- /dev/null
+++ b/app/controllers/projects/project_applies_controller.rb
@@ -0,0 +1,14 @@
+class Projects::ProjectAppliesController < Projects::BaseController
+ def create
+ project = Projects::ApplyJoinService.call(current_user, create_params)
+ render_ok(project_id: project.id)
+ rescue Projects::ApplyJoinService::Error => ex
+ render_error(ex.message)
+ end
+
+ private
+
+ def create_params
+ params.permit(:code, :role)
+ end
+end
\ No newline at end of file
diff --git a/app/jobs/apply_join_project_notify_job.rb b/app/jobs/apply_join_project_notify_job.rb
new file mode 100644
index 000000000..fe46bf0e0
--- /dev/null
+++ b/app/jobs/apply_join_project_notify_job.rb
@@ -0,0 +1,31 @@
+# 申请成为 管理员、开发者 加入项目 消息通知
+class ApplyJoinProjectNotifyJob < ApplicationJob
+ queue_as :notify
+
+ def perform(user_id, project_id, role)
+ user = User.find_by(id: user_id)
+ project = Project.find_by(id: project_id)
+ return if user.blank? || project.blank?
+
+ attrs = %i[user_id trigger_user_id container_id container_type status
+ belong_container_id belong_container_type tiding_type extra created_at updated_at]
+
+ same_attrs = {
+ trigger_user_id: user.id, status: 0, tiding_type: 'Apply', extra: role,
+ container_id: project.id, container_type: 'JoinProject',
+ belong_container_id: project.id, belong_container_type: 'Project'
+ }
+
+ # 报告人员加入时消息为系统通知消息
+ if role == 5
+ same_attrs[:container_type] = 'ReporterJoinProject'
+ same_attrs[:tiding_type] = 'System'
+ end
+
+ Tiding.bulk_insert(*attrs) do |worker|
+ project.manager_members.each do |manager|
+ worker.add(same_attrs.merge(user_id: manager.user_id))
+ end
+ end
+ end
+end
diff --git a/app/models/applied_project.rb b/app/models/applied_project.rb
new file mode 100644
index 000000000..901443e81
--- /dev/null
+++ b/app/models/applied_project.rb
@@ -0,0 +1,9 @@
+class AppliedProject < ApplicationRecord
+ belongs_to :user
+ belongs_to :project
+
+ has_many :applied_messages, as: :applied, dependent: :destroy
+ has_many :forge_activities, as: :forge_act, dependent: :destroy
+
+ scope :pending, -> { where(status: 0) }
+end
diff --git a/app/models/forge_activity.rb b/app/models/forge_activity.rb
new file mode 100644
index 000000000..77103d0ff
--- /dev/null
+++ b/app/models/forge_activity.rb
@@ -0,0 +1,5 @@
+class ForgeActivity < ApplicationRecord
+ belongs_to :user
+ belongs_to :project
+ belongs_to :forge_act, polymorphic: true
+end
\ No newline at end of file
diff --git a/app/models/member.rb b/app/models/member.rb
index d1feb8a37..70b7fe305 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -1,6 +1,8 @@
class Member < ApplicationRecord
- has_many :member_roles, dependent: :destroy
+ belongs_to :user
belongs_to :course, optional: true
belongs_to :project, optional: true
- belongs_to :user
+
+ has_many :member_roles, dependent: :destroy
+ has_many :roles, through: :member_roles
end
diff --git a/app/models/member_role.rb b/app/models/member_role.rb
index 900efc732..2461c52f1 100644
--- a/app/models/member_role.rb
+++ b/app/models/member_role.rb
@@ -1,3 +1,4 @@
class MemberRole < ApplicationRecord
+ belongs_to :role
belongs_to :member
end
diff --git a/app/models/project.rb b/app/models/project.rb
index ddc6f6e5f..c3c626cb0 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1,9 +1,12 @@
class Project < ApplicationRecord
belongs_to :owner, class_name: 'User', foreign_key: :user_id
+
has_many :members
+ has_many :manager_members, -> { joins(:roles).where(roles: { name: 'Manager' }) }, class_name: 'Member'
has_one :project_score, dependent: :destroy
has_many :issues
+ has_many :user_grades, dependent: :destroy
# 创建者
def creator
diff --git a/app/models/role.rb b/app/models/role.rb
new file mode 100644
index 000000000..e60606ffa
--- /dev/null
+++ b/app/models/role.rb
@@ -0,0 +1,3 @@
+class Role < ApplicationRecord
+ has_many :member_roles, dependent: :destroy
+end
\ No newline at end of file
diff --git a/app/models/user.rb b/app/models/user.rb
index a95776be9..14d7b2697 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -128,6 +128,9 @@ class User < ApplicationRecord
has_many :bidding_users, dependent: :destroy
has_many :bidden_project_packages, through: :bidding_users, source: :project_package
+ # 项目
+ has_many :applied_projects, dependent: :destroy
+
# Groups and active users
scope :active, lambda { where(status: STATUS_ACTIVE) }
diff --git a/app/models/user_grade.rb b/app/models/user_grade.rb
new file mode 100644
index 000000000..dffbb4743
--- /dev/null
+++ b/app/models/user_grade.rb
@@ -0,0 +1,4 @@
+class UserGrade < ApplicationRecord
+ belongs_to :project
+ belongs_to :user
+end
diff --git a/app/services/projects/apply_join_service.rb b/app/services/projects/apply_join_service.rb
new file mode 100644
index 000000000..a177de930
--- /dev/null
+++ b/app/services/projects/apply_join_service.rb
@@ -0,0 +1,82 @@
+class Projects::ApplyJoinService < ApplicationService
+ Error = Class.new(StandardError)
+
+ attr_reader :user, :params
+
+ def initialize(user, params)
+ @user = user
+ @params = params
+ end
+
+ def call
+ validate!
+
+ # 项目报告人员直接加入项目
+ if params[:role] == 'reporter'
+ Projects::JoinService.call(project, user, role: 'reporter')
+ return project
+ end
+
+ ActiveRecord::Base.transaction do
+ apply = user.applied_projects.create!(project: project, role: role_value)
+
+ apply.forge_activities.find_or_create_by!(user: user, project: project)
+
+ notify_project_manager!
+ end
+
+ # notify_project_owner
+ ApplyJoinProjectNotifyJob.perform_later(user.id, project.id, role_value)
+
+ project
+ end
+
+ private
+
+ def project
+ @_project ||= Project.find_by(invite_code: params[:code].to_s.strip)
+ end
+
+ def role_value
+ @_role ||=
+ case params[:role]
+ when 'manager' then 3
+ when 'developer' then 4
+ when 'reporter' then 5
+ else raise Error, '角色无效'
+ end
+ end
+
+ def notify_project_manager!
+ columns = %i[user_id applied_id applied_type status viewed applied_user_id role project_id created_at updated_at]
+ AppliedMessage.bulk_insert(*columns) do |worker|
+ base_attr = { status: false, viewed: false, applied_user_id: user.id, role: role_value, project_id: project.id }
+
+ project.manager_members.each do |manager|
+ worker.add(base_attr.merge(user_id: manager.user_id))
+ end
+ end
+ end
+
+ def notify_project_owner
+ owner = project.user
+ return if owner.phone.blank?
+
+ Educoder::Sms.send(mobile: owner.phone, send_type:'applied_project_info',
+ user_name: owner.show_name, name: project.name)
+ rescue Exception => ex
+ Rails.logger.error("发送短信失败 => #{ex.message}")
+ end
+
+ def validate!
+ # params check
+ raise Error, '邀请码不能为空' if params[:code].blank?
+ raise Error, '角色不能为空' if params[:role].blank?
+ raise Error, '角色无效' unless %w(manager developer reporter).include?(params[:role])
+
+ # logical check
+ raise Error, '邀请码无效' if project.blank?
+ raise Error, '您已在该项目中' if project.member?(user)
+ raise Error, '您已经提交过申请' if user.applied_projects.pending.exists?(project: project)
+ end
+end
\ No newline at end of file
diff --git a/app/services/projects/join_service.rb b/app/services/projects/join_service.rb
new file mode 100644
index 000000000..b434e48cd
--- /dev/null
+++ b/app/services/projects/join_service.rb
@@ -0,0 +1,35 @@
+class Projects::JoinService < ApplicationService
+ attr_reader :project, :user, :opts
+
+ def initialize(project, user, **opts)
+ @project = project
+ @user = user
+ @opts = opts
+ end
+
+ def call
+ ActiveRecord::Base.transaction do
+ member = project.members.create!(user: user)
+
+ member.member_roles.create!(role_id: role_value)
+
+ project.user_grades.find_or_create_by!(user: user)
+ end
+
+ ApplyJoinProjectNotifyJob.perform_later(user, project, role_value)
+
+ project
+ end
+
+ private
+
+ def role_value
+ @_role ||=
+ case opts[:role]
+ when 'manager' then 3
+ when 'developer' then 4
+ when 'reporter' then 5
+ else raise ArgumentError
+ end
+ end
+end
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 6024201a4..6623edd99 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -695,6 +695,10 @@ Rails.application.routes.draw do
end
resources :libraries, only: [:index, :show, :create, :update, :destroy]
+
+ scope module: :projects do
+ resources :applied_projects, only: [:create]
+ end
end
#git 认证回调
From 42f43753ff4b4b3f27ee6ef9ae891d5234a1c7f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 17:12:29 +0800
Subject: [PATCH 22/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 2 +-
public/stylesheets/educoder/edu-all.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index f58d44978..d220ba3a0 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 1200px;
+ min-width: 950px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 6c77ee1c5..61cfb4175 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 1200px;
+ min-width: 950px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From 70ccb3bc349c32afff550e2fac64426348e20eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 29 Jul 2019 17:34:50 +0800
Subject: [PATCH 23/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/busyWork/CommonWorkDetailIndex.js | 2 +-
.../courses/busyWork/CommonWorkList.js | 9 ++-
.../modules/user/LoginRegisterComponent.js | 57 -------------------
3 files changed, 8 insertions(+), 60 deletions(-)
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js
index a300e73dc..f1b9faab7 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js
@@ -384,7 +384,7 @@ class CommonWorkDetailIndex extends Component{
{/* 作品列表 */}
( )
+ (props) => ( )
}
>
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js
index f9deeebb4..8bc029cec 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkList.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js
@@ -400,8 +400,13 @@ class CommonWorkList extends Component{
componentDidMount() {
this.fetchList()
on('commonwork_fetch_all', this.fetchAllListener)
- $("html").animate({ scrollTop: $('html').scrollTop() - 100 })
- this.props.triggerRef(this);
+ $("html").animate({ scrollTop: $('html').scrollTop() - 100 });
+ try {
+ this.props.triggerRef(this);
+ }catch (e) {
+
+ }
+
}
componentWillUnmount() {
off('commonwork_fetch_all', this.fetchAllListener)
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index 72614e566..99884e28e 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -678,63 +678,6 @@ class LoginRegisterComponent extends Component {
}
//失去焦点判断
inputOnBlur = (e, id) => {
- // debugger
- // // this.isCorrectname(e.target.value, id);
- // // this.Emailphonenumberverification(e.target.value, id);
- // if (e.target.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(e.target.value)) {
- // stringdata = "手机号格式不正确";
- // this.setState({
- // Phonenumberisnotco: stringdata,
- // Phonenumberisnotcobool: true,
- // dragOk:false,
- // Whethertoverify:this.state.Whethertoverify===true?false:true,
- // })
- // } else {
- // console.log("706");
- // this.setState({
- // Phonenumberisnotco: undefined,
- // Phonenumberisnotcobool: false,
- // })
- // return
- // }
- //
- // if (!regemail.test(e.target.value)) {
- // if ((e.target.value.indexOf("@") != -1) === true) {
- // stringdata = "邮箱格式不正确";
- // } else {
- // stringdata = "手机号格式不正确";
- //
- // }
- // this.setState({
- // Phonenumberisnotco: stringdata,
- // Phonenumberisnotcobool: true,
- // dragOk:false,
- // Whethertoverify:this.state.Whethertoverify===true?false:true,
- // })
- // return
- // } else {
- // console.log("729");
- // this.setState({
- // Phonenumberisnotco: undefined,
- // Phonenumberisnotcobool: false,
- // })
- // this.Emailphonenumberverification(e.target.value, 1);
- // return
- // }
this.Emailphonenumberverification(e.target.value, 1);
}
inputOnBlurzhuche = (e, id) => {
From 38be938c5ecf12eefa31b6d79275a990ec58b62d Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 29 Jul 2019 17:38:24 +0800
Subject: [PATCH 24/35] 100
---
public/react/src/modules/courses/exercise/Exercisetablesmubu.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/exercise/Exercisetablesmubu.js b/public/react/src/modules/courses/exercise/Exercisetablesmubu.js
index 60c29ffbc..92cfa30b7 100644
--- a/public/react/src/modules/courses/exercise/Exercisetablesmubu.js
+++ b/public/react/src/modules/courses/exercise/Exercisetablesmubu.js
@@ -52,7 +52,7 @@ class Exercisetablesmubus extends Component {
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record, index) => {
- const _content =
+ const _content =
{text.value!="有效填写量"&&text.value!="wrong" &&
}
From 383f7963180235378b9562c167dc92928a3855f3 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 18:07:42 +0800
Subject: [PATCH 25/35] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E9=94=99=E8=AF=AF?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...0729095722_delete_error_myshixun_from_myshxiuns.rb | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 db/migrate/20190729095722_delete_error_myshixun_from_myshxiuns.rb
diff --git a/db/migrate/20190729095722_delete_error_myshixun_from_myshxiuns.rb b/db/migrate/20190729095722_delete_error_myshixun_from_myshxiuns.rb
new file mode 100644
index 000000000..ef5b86975
--- /dev/null
+++ b/db/migrate/20190729095722_delete_error_myshixun_from_myshxiuns.rb
@@ -0,0 +1,11 @@
+class DeleteErrorMyshixunFromMyshxiuns < ActiveRecord::Migration[5.2]
+ def change
+ myshixuns = Myshixun.where("created_at > '2019-07-26 00:00:00' and repo_name is null")
+ myshixuns.find_each do |myshixun|
+ if myshixun.games.blank?
+ puts("###########user_login: #{User.find(myshixun.user_id).login}")
+ myshixun.destroy!
+ end
+ end
+ end
+end
From 7a6327739004c2fd8cd18e87408a816120e0767a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 18:21:10 +0800
Subject: [PATCH 26/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 6 +++---
public/react/src/modules/tpm/NewHeader.js | 2 +-
public/stylesheets/educoder/edu-all.css | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index d220ba3a0..dc54176b9 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -1,9 +1,9 @@
/*--------------------------首页*/
/*头部导航条样式---2018-03-19--by-cs*/
.newHeader{
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
+ /*overflow:hidden;*/
+ /*text-overflow:ellipsis;*/
+ /*white-space:nowrap;*/
background: #24292D !important; width:100%; height: 60px !important; min-width: 1200px;position: fixed;top: 0px;left: 0px;z-index:1000;-moz-box-shadow: 0px 0px 12px rgba(0,0,0,0.1); /* 老的 Firefox */box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
}
.newHeader .logoimg{
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index f4a90fd81..705ba5324 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -856,7 +856,7 @@ submittojoinclass=(value)=>{
{/* /courses/join_course_multi_role */}
{/**/}
- {/* 加入项目 */}
+ 加入项目
{/* */}
Date: Mon, 29 Jul 2019 18:27:28 +0800
Subject: [PATCH 27/35] b
---
public/react/public/css/edu-all.css | 2 +-
public/react/src/modules/tpm/NewHeader.js | 6 +++---
public/stylesheets/educoder/edu-all.css | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index dc54176b9..ee2af14c8 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 950px;
+ min-width: 850px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 705ba5324..890aa4990 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -649,7 +649,7 @@ submittojoinclass=(value)=>{
{...this.state}
{...this.props}
/>:""}
-
+
@@ -781,7 +781,7 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %>
*/}
{ user===undefined?
-
+
this.educoderlogin()} className="mr5 color-white">登录
注册
@@ -790,7 +790,7 @@ submittojoinclass=(value)=>{
注册
:
-
+
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 2a6e45d68..15fc0bd32 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 950px;
+ min-width: 850px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From eaae076ab026350da3f05818ebce4061bb87cbba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 18:47:53 +0800
Subject: [PATCH 28/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 2 +-
public/react/src/modules/tpm/NewHeader.js | 12 +++++++++++-
public/stylesheets/educoder/edu-all.css | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index ee2af14c8..718ef291c 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 850px;
+ min-width: 800px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 890aa4990..b2a5ff2e1 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -653,8 +653,18 @@ submittojoinclass=(value)=>{
+
+
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 15fc0bd32..ff4665d22 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 850px;
+ min-width: 800px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From 17b615a665873b20ea8f91bedcdce4b38fabc91f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 18:59:28 +0800
Subject: [PATCH 29/35] b
---
public/react/src/modules/tpm/NewHeader.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index b2a5ff2e1..66e765135 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -735,7 +735,7 @@ submittojoinclass=(value)=>{
position: absolute;
top: -2px;
background: #fff;
- z-index: 2;
+ z-index:10000;
right: 185px;
}
`
From 45eb74b149cbb094f1394288b4167bdd50e195eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 19:01:16 +0800
Subject: [PATCH 30/35] b
---
public/react/src/modules/tpm/NewHeader.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 66e765135..209e4648a 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -795,7 +795,7 @@ submittojoinclass=(value)=>{
this.educoderlogin()} className="mr5 color-white">登录
注册
- :user.login===""?
+ :user.login===""?
this.educoderlogin()} className="mr5 color-white">登录
注册
From 587dd3da9e15184a73c35e2b04f68a4c7a54a600 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 19:34:08 +0800
Subject: [PATCH 31/35] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/tpm/NewHeader.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index b2a5ff2e1..7e82ec5d1 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -649,7 +649,7 @@ submittojoinclass=(value)=>{
{...this.state}
{...this.props}
/>:""}
-
+
From 622b4160d98e4848602ee3be6ecd78655447bc48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 19:46:09 +0800
Subject: [PATCH 32/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 2 +-
public/react/src/modules/tpm/NewHeader.js | 2 +-
public/stylesheets/educoder/edu-all.css | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index 718ef291c..7de3c8152 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 800px;
+ min-width: 793px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 13313b5d4..3d1136371 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -791,7 +791,7 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %>
*/}
{ user===undefined?
-
+
this.educoderlogin()} className="mr5 color-white">登录
注册
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index ff4665d22..730e9bab0 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 800px;
+ min-width: 793px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From ef8f7bfc4ebc60c3f92a02852191ed6e76feca8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 29 Jul 2019 19:54:19 +0800
Subject: [PATCH 33/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/public/css/edu-all.css | 2 +-
public/stylesheets/educoder/edu-all.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
index 7de3c8152..8b7c727a9 100644
--- a/public/react/public/css/edu-all.css
+++ b/public/react/public/css/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 793px;
+ min-width: 785px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 730e9bab0..4fdd8c400 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -15,7 +15,7 @@
text-align: center;
height: 60px;
box-sizing: border-box;
- min-width: 793px;
+ min-width: 785px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
From 640adcedef3cbda9329454c415ca4ad98bd0a9ee Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 20:26:24 +0800
Subject: [PATCH 34/35] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=94=99=E8=AF=AF?=
=?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../20190729122213_delete_myshixun_games_for_users.rb | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 db/migrate/20190729122213_delete_myshixun_games_for_users.rb
diff --git a/db/migrate/20190729122213_delete_myshixun_games_for_users.rb b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb
new file mode 100644
index 000000000..9c93372e9
--- /dev/null
+++ b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb
@@ -0,0 +1,11 @@
+class DeleteMyshixunGamesForUsers < ActiveRecord::Migration[5.2]
+ def change
+ myshixuns = Myshixun.where("created_at > '2019-07-26 19:00:00' and repo_name is null")
+ myshixuns.find_each do |m|
+ if m.games.count == m.games.select{|g| g.status == 3}.count
+ puts("#######login: #{User.find(m.user_id).login}")
+ myshixuns.destroy!
+ end
+ end
+ end
+end
From a38b598fa3c556641263c8ed52e92295bbc578da Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 29 Jul 2019 20:27:48 +0800
Subject: [PATCH 35/35] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=94=99=E8=AF=AF?=
=?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190729122213_delete_myshixun_games_for_users.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/migrate/20190729122213_delete_myshixun_games_for_users.rb b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb
index 9c93372e9..d52369828 100644
--- a/db/migrate/20190729122213_delete_myshixun_games_for_users.rb
+++ b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb
@@ -4,7 +4,7 @@ class DeleteMyshixunGamesForUsers < ActiveRecord::Migration[5.2]
myshixuns.find_each do |m|
if m.games.count == m.games.select{|g| g.status == 3}.count
puts("#######login: #{User.find(m.user_id).login}")
- myshixuns.destroy!
+ m.destroy!
end
end
end