dev_aliyun
cxt 5 years ago
commit d862483a30

@ -140,7 +140,6 @@ module Mobile
#
Rails.logger.info("########### host is #{request.host}")
if (Rails.env.development? && session[:user_id].blank?) ||
(session[:user_id].blank? && request.host.include?("testbdweb")) ||
params[:action] == "privateGit"
session[:user_id] = 12 #116
end

@ -1,5 +1,5 @@
class EcsController < ApplicationController
before_filter :require_login
before_filter :require_login, :except => [:get_navigation_url]
before_filter :find_school, :except => [:get_navigation_url]
before_filter :school_manager, :except => [:department, :get_navigation_url]
layout 'base_ec'

@ -30,14 +30,15 @@ class DiscussesService
memo_count = memos.count
memos = memos.offset(offset).limit(15)
#实训标签使用最多的9个
hot_tags = TagRepertoire.find_by_sql("select a.name, sum(a.cnt) cnt, a.id from
(select tr.id, tr.name, count(d.dis_id) cnt, d.root_id, s.status, s.hidden
from tag_repertoires tr join (shixun_tag_repertoires str
left join (shixuns s join discusses d on d.dis_id = s.id and d.root_id is null and s.status =2 and s.hidden=false)
on s.id = str.shixun_id) on tr.id = str.tag_repertoire_id
group by d.dis_id order by cnt desc) a group by a.name
order by cnt desc limit 9").map{|ht| ht.attributes.dup}
# hot_tags = TagRepertoire.find_by_sql("select a.name, sum(a.cnt) cnt, a.id from
# (select tr.id, tr.name, count(d.dis_id) cnt, d.root_id, s.status, s.hidden
# from tag_repertoires tr join (shixun_tag_repertoires str
# left join (shixuns s join discusses d on d.dis_id = s.id and d.root_id is null and s.status =2 and s.hidden=false)
# on s.id = str.shixun_id) on tr.id = str.tag_repertoire_id
# group by d.dis_id order by cnt desc) a group by a.name
# order by cnt desc limit 9").map{|ht| ht.attributes.dup}
tag_id = ShixunTagRepertoire.joins(:shixun).order("myshixuns_count desc").pluck(:tag_repertoire_id).uniq.first(9)
hot_tags = TagRepertoire.select([:id, :name]).where(:id => tag_id).order("FIELD(id, #{tag_id.join(",")})").map{|ht| ht.attributes.dup} if tag_id
memos = memo_list memos
user_info = format_for_current_user current_user
hot_memos = Memo.field_for_recommend.posts.hot.limit(4)

@ -0,0 +1,34 @@
<style>
/*//登录弹窗*/
.newLogipopup{
height: 100%;
width: 100%;
background-size: 100% 100%;
position: fixed;
bottom: 0px;
right: 0px;
}
ddd
</style>
<div class="educontent newLogipopup" id="backImg" >
<div class="pr edu-txt-center height-100 pt110">
<div class="login_reg pr login_regs">
<div>
<a href="javascript:void(0)" onclick="hideModal();" id="closeIcon" style="position: absolute;right: 0px;"><i class="iconfont icon-shanchudiao"></i></a>
<img src="/images/educoder/competitionslog.png" height="600px" width="600px" />
<img height="600px" width="600px" src="/images/educoder/applys.png" />
</div>
<!--第三方账号登录-->
<!--<div class="mt10 edu-txt-center">
<p class="color-grey-9">第三方账号登录</p>
<div class="mt15">
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/weixin.png" class="radius"/></a>
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/QQ.png" class="radius"/></a>
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/weibo.png" class="radius"/></a>
</div>
</div>-->
</div>
</div>
</div>

@ -76,7 +76,7 @@
<img src="<%= cover_url %>" width="120px" height="90px"/>
</div>
</div>
<p style="height:20px;line-height:20px;"><span class="color-red ml20 none" id="cover_file_notice">请上传封面</span></p>
<!-- <p style="height:20px;line-height:20px;"><span class="color-red ml20 none" id="cover_file_notice">请上传封面</span></p>-->
</div>
</div>
<div class="padding30 bor-top-greyE">
@ -168,12 +168,13 @@
$("#author_school_name_notice").addClass("none");
}
var coverId = $("input[name='library[cover_id]']").val();
if ((!coverId || coverId.length == 0) && (!cover_file || cover_file.length == 0)) {
$("#cover_file_notice").removeClass("none");
return
}else{
$("#cover_file_notice").addClass("none");
}
// if ((!coverId || coverId.length == 0) && (!cover_file || cover_file.length == 0)) {
// $("#cover_file_notice").removeClass("none");
// return
// }else{
// $("#cover_file_notice").addClass("none");
// }
if($('.attachments_fields .attachment').length == 0){
$("#file_notice").removeClass("none");

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

@ -1234,10 +1234,15 @@ html>body #ajax-indicator { position: fixed; }
}
.edu-menu-lists currentName{
.edu-menu-lists .currentName{
text-align: left;
}
.edu-menu-lists li{
text-align: left;
}
.login_regs{
margin-right: 35%;
width: 558px;
}
Loading…
Cancel
Save