From e1108f0f786c5aae6437161c03e6633f998ea7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 1 Nov 2019 11:10:24 +0800 Subject: [PATCH 1/5] =?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/courses/new/CoursesNew.js | 2 +- public/react/src/modules/courses/new/Goldsubject.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 8cf60baf3..f9cea2da2 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -870,7 +870,7 @@ class CoursesNew extends Component { "shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group", ], })( - + 公告栏 实训作业 普通作业 diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 1cc17a63d..f04bf1f4b 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -992,7 +992,7 @@ class Goldsubject extends Component { "announcement","online_learning","shixun_homework","common_homework", ], })( - + 公告栏 在线学习 实训作业 From 26c2b47dac76ac6433815b40e1957727e2756114 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 1 Nov 2019 11:30:53 +0800 Subject: [PATCH 2/5] w --- public/react/src/modules/tpm/challengesnew/TPManswer2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPManswer2.js b/public/react/src/modules/tpm/challengesnew/TPManswer2.js index 19765597e..6cbfcd081 100644 --- a/public/react/src/modules/tpm/challengesnew/TPManswer2.js +++ b/public/react/src/modules/tpm/challengesnew/TPManswer2.js @@ -313,7 +313,7 @@ export default class TPManswer extends Component { From 4892d4f9875ec5d15f14cae229d2571723795590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 1 Nov 2019 11:57:48 +0800 Subject: [PATCH 3/5] =?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/tpm/NewHeader.js | 11 +++++-- .../modules/user/usersInfo/InfosProject.js | 4 ++- .../modules/user/usersInfo/publicCreatNew.js | 31 +++++++++++++++---- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index eaf3204f2..64d413f88 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -606,7 +606,14 @@ submittojoinclass=(value)=>{ ) } //头部获取是否已经登录了 - getUser=(url)=>{ + getUser=(url,type)=>{ + + if(type==="projects"){ + if(!this.props.user&&this.props.user.email){ + this.openNotification("请先绑定邮箱,谢谢"); + return + } + } // console.log("点击了503") // console.log(url); let{user} =this.state; @@ -1254,7 +1261,7 @@ submittojoinclass=(value)=>{ {this.props.Headertop===undefined?"":
  • this.getUser("/paths/new")} >新建实践课程
  • } -
  • this.getUser("/projects/new")} target="_blank">新建开发项目
  • +
  • this.getUser("/projects/new","projects")} target="_blank">新建开发项目
    • diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index f07bcd767..7bfde98b0 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -133,7 +133,9 @@ class InfosProject extends Component{ {/* 289 */} { page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ? - :"" + :"" } { (!data || (data && data.projects.length==0)) && category && diff --git a/public/react/src/modules/user/usersInfo/publicCreatNew.js b/public/react/src/modules/user/usersInfo/publicCreatNew.js index 25dd4a030..09431f540 100644 --- a/public/react/src/modules/user/usersInfo/publicCreatNew.js +++ b/public/react/src/modules/user/usersInfo/publicCreatNew.js @@ -14,17 +14,36 @@ class publicCreateNew extends Component{ constructor(props){ super(props); } + + //头部获取是否已经登录了 + getUser=(url)=> { + console.log(this.props) + if (!this.props.user && this.props.user.email) { + this.props.showNotification("请先绑定邮箱,谢谢"); + return + } + + + if(url !== undefined || url!==""){ + window.location.href = url; + } + } render() { let {href,name,index}=this.props; return (
      - -
      -
      -
      -
      -
      + {this.props.Createtype==="projects"?this.getUser(href)}> +
      +
      +
      +
      +
      : +
      +
      +
      +
      +
      }
      From 0e083f4123f9fd18a438193895b36cb144714d38 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 1 Nov 2019 14:33:45 +0800 Subject: [PATCH 4/5] competition: prize info api --- app/controllers/competitions/prizes_controller.rb | 5 ++++- app/views/competitions/prizes/show.json.jbuilder | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/competitions/prizes_controller.rb b/app/controllers/competitions/prizes_controller.rb index aab1df9a1..116548de7 100644 --- a/app/controllers/competitions/prizes_controller.rb +++ b/app/controllers/competitions/prizes_controller.rb @@ -5,7 +5,10 @@ class Competitions::PrizesController < Competitions::BaseController self_prizes = current_competition.competition_prize_users.where(user_id: current_user.id).includes(:competition_team) @leader = self_prizes.any?(&:leader?) # 是否为队长 - @bank_account = self_prizes.find(&:leader?).extra if @leader + if @leader + @bank_account = self_prizes.find(&:leader?).extra + @bank_account_editable = self_prizes.select(&:leader?).all?(&:pending?) + end @self_prizes = self_prizes.select(&:certificate_exist?) # 个人证书quit @team_prizes = self_prizes.map(&:competition_team).uniq.select(&:certificate_exists?) # 团队证书 diff --git a/app/views/competitions/prizes/show.json.jbuilder b/app/views/competitions/prizes/show.json.jbuilder index 5bd4a5ae6..c8de20430 100644 --- a/app/views/competitions/prizes/show.json.jbuilder +++ b/app/views/competitions/prizes/show.json.jbuilder @@ -1,6 +1,9 @@ json.leader @leader -json.bank_account @bank_account if @leader +if @leader + json.bank_account @bank_account + json.bank_account_editable @bank_account_editable +end json.personal_certifications do json.array! @self_prizes do |prize_user| From 1d85f75471e16aad2ab092b77ebb0bea3780c291 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 1 Nov 2019 14:52:07 +0800 Subject: [PATCH 5/5] tip --- .../modules/courses/members/CourseGroupListTable.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js index 88d0598b1..5551faee3 100644 --- a/public/react/src/modules/courses/members/CourseGroupListTable.js +++ b/public/react/src/modules/courses/members/CourseGroupListTable.js @@ -132,8 +132,17 @@ function CourseGroupListTable(props) { render: (none, record, index) => { return {!isCourseEnd && isAdmin && onDelete(record)} style={'grey'}>删除分班} - {isAdmin && 复制邀请码 } + {isAdmin && + +
      成员可以通过邀请码主动加入分班
      +
      点击复制邀请码
      +
      + }> + 复制邀请码 + + } {isStudent && addToDir(record)} style={''}>加入分班} onGoDetail(record)} style={''}>查看