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

dev_aliyun
cxt 6 years ago
commit cb43a8f71e

@ -43,7 +43,7 @@
},{ },{
name: 'C++项目', name: 'C++项目',
description: "Sentencepiece是Google公司开发的一个C++自然语言处理工具包,它实现了数据驱动、跨语言、高性能、轻量级的面向神经网络文本生成系统的无监督文本词条化工具。<br/><br/>本项目的src/目录中包含了BPE、Unigram以及Char等文本分词算法的C++实现。", description: "Sentencepiece是Google公司开发的一个C++自然语言处理工具包,它实现了数据驱动、跨语言、高性能、轻量级的面向神经网络文本生成系统的无监督文本词条化工具。<br/><br/>本项目的src/目录中包含了BPE、Unigram以及Char等文本分词算法的C++实现。",
task: '标注../src/目录下的所有.cc和.h代码文件不包括子目录(注:其中模型训练、测试相关代码可以去掉:*_test.cc, *_trainer.cc, *_trainer.h', task: '标注../src/目录下的所有.cc和.h代码文件不包括子目录。',
link_name: 'CSDN, sentencePiece入门小结', link_name: 'CSDN, sentencePiece入门小结',
link_url: 'https://blog.csdn.net/sinat_33455447/article/details/90265938' link_url: 'https://blog.csdn.net/sinat_33455447/article/details/90265938'
},{ },{

@ -18,7 +18,7 @@
</ul> </ul>
<div class="edu-position fr mt12 mb10"> <div class="edu-position fr mt12 mb10">
<%= hidden_field_tag(:type, params[:type]) %> <%= hidden_field_tag(:type, params[:type]) %>
<input class="winput-300-35 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name"> <input class="winput-300-35 panel-box-sizing" placeholder="输入教学案例标题、作者、单位进行检索" type="text" id="search_name">
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a> <a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a>
</div> </div>
</div> </div>

@ -2,8 +2,12 @@
praised = PraiseTread.praised(object) praised = PraiseTread.praised(object)
praise_num = get_praise_num(object) || 0 praise_num = get_praise_num(object) || 0
%> %>
<% if User.current.try(:logged?) %>
<p class="noteDetailPoints plus-praise-btn" data-tip-down="点赞" style="<%= praised ? 'display:block' : 'display:none' %>"><i class="iconfont icon-dianzan"></i><br><span class="praise-num"><%= praise_num %></span></p> <p class="noteDetailPoints plus-praise-btn" data-tip-down="点赞" style="<%= praised ? 'display:block' : 'display:none' %>"><i class="iconfont icon-dianzan"></i><br><span class="praise-num"><%= praise_num %></span></p>
<p class="noteDetailPointsBCD1E3 minus-praise-btn" data-tip-down="取消点赞" style="<%= praised ? 'display:none' : 'display:block' %>"><span>已赞</span><br><span class="praise-num"><%= praise_num %></span></p> <p class="noteDetailPointsBCD1E3 minus-praise-btn" data-tip-down="取消点赞" style="<%= praised ? 'display:none' : 'display:block' %>"><span>已赞</span><br><span class="praise-num"><%= praise_num %></span></p>
<% else %>
<p class="noteDetailPointsBCD1E3 minus-praise-btn unlogged"><i class="iconfont icon-dianzan"></i><br><span class="praise-num"><%= praise_num %></span></p>
<% end %>
<script> <script>
$(function(){ $(function(){
@ -26,6 +30,11 @@
}); });
$minusPraiseBtn.on('click', function(){ $minusPraiseBtn.on('click', function(){
if($(this).hasClass('unlogged')){
window.location.href = '<%= signin_path(back_url: request.original_url) %>';
return;
}
$.ajax({ $.ajax({
method: "get", method: "get",
url: "<%= praise_tread_praise_minus_path(obj_id: object.id, obj_type: object.class) %>", url: "<%= praise_tread_praise_minus_path(obj_id: object.id, obj_type: object.class) %>",

@ -41,7 +41,7 @@ var proxy = "http://localhost:3000"
// proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net" // proxy = "http://testbdweb.educoder.net"
// proxy ="http://192.168.2.63:3000" // proxy ="http://192.168.2.63:3000"
// proxy='https://www.educoder.net' proxy='http://120.27.231.56:48080'
const requestMap={}; const requestMap={};
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -258,7 +258,8 @@ class NewHeader extends Component {
} }
NewCoursesAndShixuns=(sum)=>{ NewCoursesAndShixuns=(sum)=>{
if(this.props.current_user&&this.props.current_user.login=== ""){ debugger
if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){
window.location.href = "/login"; window.location.href = "/login";
}else{ }else{
if(sum===1){ if(sum===1){

Loading…
Cancel
Save