Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into tree01

competitions
杨树林 5 years ago
commit 1139e68a16

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

@ -393,10 +393,6 @@ class PollDetailTabForthRules extends Component{
`
}
</style>
<Tooltip placement="bottom"
title={
rule.p_timeflag===undefined?moment(rule.publish_time,dataformat) <= moment()?isAdmin===true?"发布时间已过,不能再修改":"":"": rule.e_timeflag ===undefined?rule.publish_time===null?"":!flagPageEdit:rule.p_timeflag == true ?isAdmin===true?"发布时间已过,不能再修改":"" : ""
}>
<Select
placeholder="请选择分班名称"
className={rule.class_flag && rule.class_flag!=""?"noticeTip setInfo":"setInfo" }
@ -416,7 +412,6 @@ class PollDetailTabForthRules extends Component{
})
}
</Select>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{
rule.class_flag && rule.class_flag!=""?<span className="fl color-red">{rule.class_flag}</span>:""

@ -109,7 +109,7 @@
right: -27px;
z-index: 100000;
}
#logincloseIcon{
.logincloseIcon{
position: absolute;
top: -100px;
right: -27px;

Loading…
Cancel
Save