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

dev_daiao
cxt 5 years ago
commit b0f359e548

@ -41,4 +41,9 @@ class Hack < ApplicationRecord
hack_sets.first&.input
end
# 管理员
def manager?(user)
user_id == user.id || user.admin_or_business?
end
end

@ -14,4 +14,6 @@ end
json.user do
json.partial! 'users/user', user: current_user
json.hack_manager @hack.manager?(current_user)
end

@ -1,5 +1,5 @@
# 编程内容
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not)
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status)
# 代码
json.language @hack.language

@ -242,7 +242,7 @@ class ShixunsHome extends Component {
</div>
<Link to={"/paths"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>
<div className="square-list clearfix" style={{'width':'100%','padding-left':'20px'}}>
<div className="square-list clearfix" style={{'width':'100%','padding-left':'25px'}}>
{homedatalist===undefined?"":homedatalist.subjects.map((item,key)=>{
@ -321,7 +321,7 @@ class ShixunsHome extends Component {
</div>
<Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>
<div className="square-list clearfix" style={{'width':'100%','padding-left':'20px'}}>
<div className="square-list clearfix" style={{'width':'100%','padding-left':'25px'}}>
<style>
{
`

Loading…
Cancel
Save