From 1cea71dd07fd9d183fcbbf87e0c534b146768f94 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Tue, 23 Jul 2019 11:18:35 +0800
Subject: [PATCH 01/17] 1440
---
public/react/src/modules/tpm/TPMIndexHOC.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index 2beb9fa1b..e092c17d4 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -302,11 +302,12 @@ export function TPMIndexHOC(WrappedComponent) {
+ {/* 注释掉了1440 影响到了手机屏幕的展示 */}
-
@@ -298,7 +299,7 @@ class PathModal extends Component{
})
}
-
+ }
{ this.state.patheditarrytype===true?{this.state.patheditarryvalue}:""}
取消
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
index e47fe5a0f..fc0a0fea9 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
@@ -142,11 +142,15 @@ class DetailCardsEditAndAdd extends Component{
//打开选择实训弹框初始化tag标签和列表
changeTag=(id,search)=>{
- this.setState({
- hometypepvisible:true,
- })
- let pathId=this.props.pathid;
- let {page}=this.state;
+
+ this.setState({
+ ChooseShixunListshixun_list:[],
+ page:1,
+ hometypepvisible:true,
+ })
+
+ let pathId=this.props.pathid;
+
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+1
if(search!="" && search!=undefined){
url+="&search="+search;
@@ -157,11 +161,6 @@ class DetailCardsEditAndAdd extends Component{
axios.get(url).then((result)=>{
if(result.status===200){
- this.setState({
- ChooseShixunListshixun_list:[],
- page:1
- })
-
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
@@ -296,11 +295,10 @@ class DetailCardsEditAndAdd extends Component{
contentViewScrolladd=(e)=>{
- let {page}=this.state;
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
- if(page!=1){
+ debugger
this.setState({
hometypepvisible:true
})
@@ -334,7 +332,7 @@ class DetailCardsEditAndAdd extends Component{
}).catch((error)=>{
console.log(error);
})
- }
+
}
@@ -493,7 +491,7 @@ class DetailCardsEditAndAdd extends Component{
`
}
-
@@ -520,7 +518,7 @@ class DetailCardsEditAndAdd extends Component{
})
}
-
+
}
取消
确定
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index 72bbbe3d0..ed1249f0d 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -392,10 +392,12 @@ export default class TPMsettings extends Component {
let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => {
if (response.status === 200) {
- this.setState({
- departmentslist: response.data.shools_name
- });
- }
+ if (response.data.message === undefined) {
+ this.setState({
+ departmentslist: response.data.shools_name
+ });
+ }
+ }
}).catch((error) => {
console.log(error)
});
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index 956e652c8..cb0f08c0f 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -251,9 +251,11 @@ class Newshixuns extends Component {
let departmentsUrl = `/shixuns/departments.json`;
axios.get(departmentsUrl).then((response) => {
if (response.status === 200) {
- this.setState({
- departmentslist: response.data.shools_name
- });
+ if (response.data.message===undefined) {
+ this.setState({
+ departmentslist: response.data.shools_name
+ });
+ }
}
}).catch((error) => {
console.log(error)
@@ -496,7 +498,9 @@ class Newshixuns extends Component {
function fake() {
let departmentsUrl = `/shixuns/departments.json?q=` + currentValue;
axios.get(departmentsUrl).then((response) => {
- callback(response.data.shools_name);
+ if (response.data.message===undefined) {
+ callback(response.data.shools_name);
+ }
}).catch((error) => {
console.log(error)
});
From 5cf824022a36c4b27789b97d933efda877a9ee89 Mon Sep 17 00:00:00 2001
From: jingquan huang
Date: Tue, 23 Jul 2019 12:12:03 +0800
Subject: [PATCH 10/17] =?UTF-8?q?=E6=8E=88=E6=9D=83=E8=AE=A4=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/application_controller.rb | 33 +++++++++++++++++------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index b0183574d..28fec46af 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -186,15 +186,32 @@ class ApplicationController < ActionController::Base
# 系统全局认证
def check_auth
- if current_user.certification != 1 && current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
- tip_exception(408, "您的试用申请正在审核中,请耐心等待")
- elsif current_user.certification != 1
- day_cer = UserDayCertification.find_by(user_id: current_user.id)
- tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
- elsif !current_user.profile_completed?
- info_url = '/account/profile'
- tip_exception(402, info_url)
+ day_cer = UserDayCertification.find_by(user_id: current_user.id)
+ # 如果注册超过24小时则需要完善资料及授权
+ if (Time.now.to_i - day_cer.try(:created_at).to_i) > 86400
+ if !current_user.profile_completed?
+ info_url = '/account/profile'
+ tip_exception(402, info_url)
+ elsif current_user.certification != 1
+ if current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
+ tip_exception(408, "您的试用申请正在审核中,请耐心等待")
+ end
+ tip_exception(407, "系统未授权")
+ end
end
+
+
+ # if current_user.certification != 1 && current_user.apply_actions.exists?(container_type: 'TrialAuthorization', status: 0)
+ # tip_exception(408, "您的试用申请正在审核中,请耐心等待")
+ # elsif (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
+ # if !current_user.profile_completed?
+ # info_url = '/account/profile'
+ # tip_exception(402, info_url)
+ # elsif current_user.certification != 1
+ # day_cer = UserDayCertification.find_by(user_id: current_user.id)
+ # tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
+ # end
+ # end
end
def start_user_session(user)
From aefe7a8fa2813d4a34a706e1e63e389a94c6a78a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 12:12:47 +0800
Subject: [PATCH 11/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/new/CoursesNew.js | 28 +++++++++++--------
public/react/src/modules/tpm/NewHeader.js | 8 +++---
2 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index eb1627e83..a8f50b030 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -290,11 +290,13 @@ class CoursesNew extends Component {
search:value
}).then((result)=>{
// console.log(result.data)
- this.setState({
- searchlist:result.data.course_lists,
- // course:value,
- fetching:false
- })
+ if (response.data.message===undefined) {
+ this.setState({
+ searchlist: result.data.course_lists,
+ // course:value,
+ fetching: false
+ })
+ }
// this.props.form.setFieldsValue({
// course:value
// })
@@ -343,13 +345,15 @@ class CoursesNew extends Component {
search: value
}
}).then((result)=>{
- this.setState({
- searchlistscholl:result.data.school_names,
- scholl:value
- })
- this.props.form.setFieldsValue({
- scholl:value
- })
+ if (response.data.message===undefined) {
+ this.setState({
+ searchlistscholl: result.data.school_names,
+ scholl: value
+ })
+ this.props.form.setFieldsValue({
+ scholl: value
+ })
+ }
}).catch((error)=>{
console.log(error)
})
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 8e48e8b0d..28de997cd 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -534,10 +534,10 @@ submittojoinclass=(value)=>{