From 0c877307f0c3542e3b1fe698da6a7b49cf6dd8b0 Mon Sep 17 00:00:00 2001 From: dinglink <837816638@qq.com> Date: Tue, 24 Mar 2020 09:56:31 +0800 Subject: [PATCH 01/40] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ---- .../react/src/context/TPIContextProvider.js | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index a8bd0c4b4..d91c42fcf 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -46,11 +46,7 @@ debugType = "admin"; // 老师 // debugType="teacher"; // 学生 -<<<<<<< HEAD //debugType="student"; -======= -// debugType="student"; ->>>>>>> 97765680b4f08ade017f6db22b1c76dcb0ae29f7 diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index fa0cbafcd..64b93f016 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -133,13 +133,15 @@ class TPIContextProvider extends Component { }) } + componentWillMount () { + // 拦截判断是否离开当前页面 + } + componentWillUnmount() { this.costTimeInterval && window.clearInterval(this.costTimeInterval) } componentDidMount() { - window.$(window).unload( ()=>{ - console.log(12321) - }); + // TODO 登录状态的判断? // request @@ -161,12 +163,16 @@ class TPIContextProvider extends Component { } }, 1000) - // 页面离开时存下用户的任务耗时 - window.$(window).bind('beforeunload', function (e) { - console.log(111111) + // // 页面离开时存下用户的任务耗时 + window.$(window).bind('beforeunload',()=>{ + console.log(111) this._updateCostTime(); }) + window.$(window).unload( ()=>{ + this._updateCostTime(); + + }); // // 页面离开时存下用户的任务耗时 // window.$(window).unload( ()=>{ // this._updateCostTime(); @@ -190,6 +196,7 @@ class TPIContextProvider extends Component { if (window.location.port == 3007) { testPath = 'http://test-newweb.educoder.net' } + console.log(222) // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time${getRandomNumber()}` window.$.ajax({ From b26bbdb27712284b859be228424b601279eeca36 Mon Sep 17 00:00:00 2001 From: dinglink <837816638@qq.com> Date: Tue, 24 Mar 2020 11:00:25 +0800 Subject: [PATCH 02/40] =?UTF-8?q?=E8=AF=BE=E5=A0=82=E8=AF=A6=E6=83=85=20?= =?UTF-8?q?=E5=8F=8A=E5=AE=9E=E8=AE=AD=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 -- .../react/src/context/TPIContextProvider.js | 10 ++-- .../courses/coursesDetail/CoursesBanner.js | 48 ++++++++++++------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index ce5475ffc..afed0fa9d 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -46,11 +46,7 @@ debugType = "admin"; // 老师 // debugType="teacher"; // 学生 -<<<<<<< HEAD - //debugType="student"; -======= // debugType="student"; ->>>>>>> 65f1f7ca73d06c88eeec624eaa865b259c525706 diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 64b93f016..291626038 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -164,15 +164,14 @@ class TPIContextProvider extends Component { }, 1000) // // 页面离开时存下用户的任务耗时 - window.$(window).bind('beforeunload',()=>{ - console.log(111) + window.$(window).bind('beforeunload',()=>{ this._updateCostTime(); }) - window.$(window).unload( ()=>{ + // window.$(window).unload( ()=>{ - this._updateCostTime(); + // this._updateCostTime(); - }); + // }); // // 页面离开时存下用户的任务耗时 // window.$(window).unload( ()=>{ // this._updateCostTime(); @@ -196,7 +195,6 @@ class TPIContextProvider extends Component { if (window.location.port == 3007) { testPath = 'http://test-newweb.educoder.net' } - console.log(222) // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time${getRandomNumber()}` window.$.ajax({ diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 180599fa8..a6e22f080 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -601,26 +601,38 @@ class CoursesBanner extends Component { +
+ + 头像 + + +
+

+ {coursedata.teacher_name} +

+
+
+

{coursedata.teacher_school}

+
-
-
- - - 头像 - - -
-

- {coursedata.teacher_name} -

-
- +
-
-

{coursedata.teacher_school}

-
+
+
+
+ {coursedata.teacher_users.length===0?'': + 协作老师: + {coursedata.teacher_users.map((iem,idx)=>{ + return( + {idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''} + ) + }) + } + + } +
From 1f0b9429cd8e03046a48fbae712b56de8e1deae0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 24 Mar 2020 13:05:47 +0800 Subject: [PATCH 03/40] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/exercise_choice.rb | 2 +- app/models/exercise_question.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/exercise_choice.rb b/app/models/exercise_choice.rb index 3cfd7a17c..617f5b453 100644 --- a/app/models/exercise_choice.rb +++ b/app/models/exercise_choice.rb @@ -7,6 +7,6 @@ class ExerciseChoice < ApplicationRecord scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题 scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题 - validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" } + # validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" } end \ No newline at end of file diff --git a/app/models/exercise_question.rb b/app/models/exercise_question.rb index 2b8d88c57..e34c316aa 100644 --- a/app/models/exercise_question.rb +++ b/app/models/exercise_question.rb @@ -16,7 +16,7 @@ class ExerciseQuestion < ApplicationRecord scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题 scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题 - validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" } + # validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" } def question_type_name From 448151f51a406cd3c95c613c4b201b70b2abc166 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 24 Mar 2020 13:23:17 +0800 Subject: [PATCH 04/40] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=AF=95=E5=8D=B7?= =?UTF-8?q?=E9=A2=98=E5=BA=93=E7=9A=84=E5=AD=97=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/exercise_bank_choice.rb | 2 +- app/models/exercise_bank_question.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/exercise_bank_choice.rb b/app/models/exercise_bank_choice.rb index 4a4c46251..70465a72e 100644 --- a/app/models/exercise_bank_choice.rb +++ b/app/models/exercise_bank_choice.rb @@ -5,6 +5,6 @@ class ExerciseBankChoice < ApplicationRecord scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题 scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题 - validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" } + # validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" } end \ No newline at end of file diff --git a/app/models/exercise_bank_question.rb b/app/models/exercise_bank_question.rb index 75d6bfedf..311c81491 100644 --- a/app/models/exercise_bank_question.rb +++ b/app/models/exercise_bank_question.rb @@ -11,7 +11,7 @@ class ExerciseBankQuestion < ApplicationRecord scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题 scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题 - validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" } + # validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" } def question_type_name case self.question_type From a62e539a834cf9ca5e5587247cc6ba7c1b5ec1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 24 Mar 2020 15:13:46 +0800 Subject: [PATCH 05/40] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B7=BB=E5=8A=A0zoom?= =?UTF-8?q?=20=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/Video/Live.js | 56 ++++++++++++++---- .../src/modules/courses/Video/LiveNew.js | 6 +- .../src/modules/courses/Video/VideoIndex.js | 8 ++- .../src/modules/courses/Video/images/zoom.png | Bin 0 -> 3403 bytes .../question/questioncss/questioncom.css | 2 +- 5 files changed, 54 insertions(+), 18 deletions(-) create mode 100755 public/react/src/modules/courses/Video/images/zoom.png diff --git a/public/react/src/modules/courses/Video/Live.js b/public/react/src/modules/courses/Video/Live.js index d869922fb..a7b7f6890 100644 --- a/public/react/src/modules/courses/Video/Live.js +++ b/public/react/src/modules/courses/Video/Live.js @@ -9,6 +9,7 @@ import bilibili from './images/bilibili.png'; import tencent from './images/tencent.png'; import WeiBaiTong from './images/WeiBaiTong.png'; import douyu from './images/douyu.jpg'; +import zoom from './images/zoom.png'; class Live extends Component{ render(){ @@ -16,32 +17,65 @@ class Live extends Component{ return(
+

EduCoder支持所有第三方直播平台,特别推荐:

-
    -
  • + { lives && lives.length > 0 ? @@ -79,4 +113,4 @@ class Live extends Component{ ) } } -export default Live; \ No newline at end of file +export default Live; diff --git a/public/react/src/modules/courses/Video/LiveNew.js b/public/react/src/modules/courses/Video/LiveNew.js index e95400ed0..2c10bfe32 100644 --- a/public/react/src/modules/courses/Video/LiveNew.js +++ b/public/react/src/modules/courses/Video/LiveNew.js @@ -9,7 +9,7 @@ import axios from 'axios'; const { TextArea } = Input; const { Option } = Select; -const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通']; +const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通','zoom']; function range(start, end) { const result = []; @@ -290,7 +290,7 @@ class LiveNew extends Component{