Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

competitions
杨树明 5 years ago
commit 63c0596b0b

@ -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

@ -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

@ -61,7 +61,8 @@ class Titlesearchsection extends Component{
<p className="clearfix padding30 bor-bottom-greyE">
<p style={{height: '20px'}}>
<span className="font-18 fl color-dark-21 filesnameslist" title={title}>{title}</span>
{/* title={title} */}
<span className="font-18 fl color-dark-21 filesnameslist" >{title}</span>
<li className="fr font-16">
{ firstRowRight }
</li>

@ -710,7 +710,7 @@ class studentsList extends Component{
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
<React.Fragment>
<span>
<Tooltip title="返回">
<Tooltip title="返回至分班列表">
<i className="icon-zuojiantou iconfont font-14" onClick={() => { this.props.history.push(`/courses/${courseId}/course_groups`)}}
style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }}
></i>

@ -350,6 +350,12 @@ class PollDetailTabForthRules extends Component{
<span className="fl pr20 color-grey-c with25">(学生收到{this.props.moduleName || (this.props.type==="Exercise"?"试卷":"问卷")}的时间)</span>
<span className="fl color-grey-c">({this.props.moduleName == '作业' ? '学生“按时”提交作品的时间截点' : '学生可以答题的时间截点'})</span>
</p>
{/* item宽度超长 */}
<style>{`
.setInfo .ant-select-selection--multiple .ant-select-selection__choice__content {
max-width: 300px;
}
`}</style>
{
rules && rules.length > 0 && rules.map((rule,r)=>{
@ -383,7 +389,8 @@ class PollDetailTabForthRules extends Component{
`.ant-select{
min-width:200px,
min-heigth:200px
}`
}
`
}
</style>
<Select

Loading…
Cancel
Save