平台的用户反馈增加“问题页面网址”输入入口,且必填

dev_haigong
cxt 6 years ago
parent e1fc755f49
commit 4eeb6f1fcc

@ -141,6 +141,7 @@ class AccountController < ApplicationController
@resubmit = "#{code}"
@agreement = Help.first
@cooperation = Cooperation.all
@url = params[:url]
@com_coop_img = CooImg.where(:img_type => 'com_coop').order("position asc")
@edu_coop_img = CooImg.where(:img_type => 'edu_coop').order("position asc")
@ -208,7 +209,7 @@ class AccountController < ApplicationController
end
def insert_suggest
content = "<p>[#{params[:question_kind]}]</p>" + params[:description]
content = "<p>[#{params[:question_kind]}]</p>" + "<p>问题页面网址:#{params[:url]}</p>" + params[:description]
PrivateMessage.create(:user_id => User.current.id, :target_id => 1, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 1)
PrivateMessage.create(:user_id => 1, :target_id => User.current.id, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 0)
redirect_to message_detail_user_path(User.current, :user_id => 1)

@ -45,6 +45,13 @@
</label>
</div>
</div>
<div class="clearfix mt10">
<span class="mr5 color-orange font-16">*</span><span class="font-16">问题页面网址</span>
<div class="font-14 mt10 ml20 clearfix">
<input type="text" class="width100 radius4" id="url_content" name ="url" value="<%= @url %>" style="height: 40px;" placeholder="反馈平台问题,请同时填写对应的问题页面链接,以便平台能够及时跟踪解决,谢谢">
</div>
<p class="color-orange ml20 mt5 undis" id="new_memo_url_notice"><i class="fa fa-exclamation-circle mr5"></i>网址不能为空</p>
</div>
<div class="clearfix mt10">
<span class="mr5 color-orange font-16">*</span><span class="font-16">问题描述</span>
<div class="font-14 mt10 ml20 clearfix">
@ -62,8 +69,8 @@
<!--</div>-->
<!--</div>-->
<a href="javascript:void(0);" class="defalutSubmitbtn fl ml20 mt10" onclick="insert_suggest()">提交</a>
<% end %>
</div>
<% end %>
</div>
</div>
</div>
@ -88,6 +95,14 @@
});
});*/
function regexContent() {
if($("#url_content").val()==""){
$("#new_memo_url_notice").show();
return false;
}
else {
$("#new_memo_url_notice").hide();
}
// KE输入框类被添加了元素导致isEmpty方法失效
if($("#description").val()==""){
$("#new_memo_content_notice").show();

@ -27,7 +27,7 @@
<script>
$.ajax({
url:'<%= help_path() %>',
data: {index: '<%= @index %>'},
data: {index: '<%= @index %>', url: '<%= @url %>'},
type: 'post',
dataType: 'script'
})

@ -6,7 +6,7 @@
</div>
<div class="feedback" tooltips="意见反馈">
<a target="_blank" class="color_white inline" href="<%= help_path(:index => 6) %>">
<a target="_blank" class="color_white inline" href="<%= help_path(:index => 6, :url => request.url) %>">
<i class="iconfont icon-yijianfankui color-white font-22 fl"></i>
</a>
</div>

Loading…
Cancel
Save