小程序端的意见反馈

chromesetting
cxt 5 years ago
parent 479fb63c3c
commit f34fc80a63

@ -25,7 +25,14 @@ class HelpsController < ApplicationController
end
def feedback
content = "<p>[#{params[:question_kind]}]</p><p>问题页面网址:#{params[:url]}</p>#{params[:description]}"
if params[:url].blank?
content = "<p>[#{params[:question_kind]}]</p></p>#{params[:description]}"
params[:attachment_ids].each do |attachment_id|
content += "![](/api/attachments/#{attachment_id})↵"
end
else
content = "<p>[#{params[:question_kind]}]</p><p>问题页面网址:#{params[:url]}</p>#{params[:description]}"
end
ActiveRecord::Base.transaction do
attr = { sender_id: User.current.id, receiver_id: 1, content: content, send_time: Time.now }

Loading…
Cancel
Save