diff --git a/app/libs/hot_search_keyword.rb b/app/libs/hot_search_keyword.rb new file mode 100644 index 000000000..e222bf3a7 --- /dev/null +++ b/app/libs/hot_search_keyword.rb @@ -0,0 +1,22 @@ +class HotSearchKeyword + class << self + def add(keyword) + return if keyword.blank? + Rails.cache.data.zincrby(redis_key, 1, keyword) + end + + def hot(limit = 5) + Rails.cache.data.zrevrange(redis_key, 0, limit - 1) + end + + def available? + Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) + end + + private + + def redis_key + 'educoder:es:hot_keyword' + end + end +end \ No newline at end of file diff --git a/app/services/create_bind_user_service.rb b/app/services/create_bind_user_service.rb index 93d9d87ca..f7fc5b6f6 100644 --- a/app/services/create_bind_user_service.rb +++ b/app/services/create_bind_user_service.rb @@ -17,7 +17,7 @@ class CreateBindUserService < ApplicationService bind_user = User.try_to_login(params[:username], params[:password]) raise Error, '用户名或者密码错误' if bind_user.blank? - raise Error, '该账号已被绑定' if bind_user.bind_open_user?(params[:type].to_s) + raise Error, '该账号已被其他微信号绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s) ActiveRecord::Base.transaction do open_user.user_id = bind_user.id diff --git a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js index aa7a54cce..c71ef38ea 100644 --- a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js +++ b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js @@ -61,7 +61,8 @@ class Titlesearchsection extends Component{

- {title} + {/* title={title} */} + {title}

  • { firstRowRight }
  • diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index a63509c59..8a223ce91 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -710,7 +710,7 @@ class studentsList extends Component{ title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"): - + { this.props.history.push(`/courses/${courseId}/course_groups`)}} style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }} > diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index ce1ee843e..19a65f7e7 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -350,6 +350,12 @@ class PollDetailTabForthRules extends Component{ (学生收到{this.props.moduleName || (this.props.type==="Exercise"?"试卷":"问卷")}的时间) ({this.props.moduleName == '作业' ? '学生“按时”提交作品的时间截点' : '学生可以答题的时间截点'})

    + {/* item宽度超长 */} + { rules && rules.length > 0 && rules.map((rule,r)=>{ @@ -383,7 +389,8 @@ class PollDetailTabForthRules extends Component{ `.ant-select{ min-width:200px, min-heigth:200px - }` + } + ` }