@ -27,6 +27,11 @@ module ApplicationHelper
sanitize content, tags: tags, attributes: attributes
end
# MD5加密
def md5_encode(content)
Digest::MD5.hexdigest(content)
def graduation_navigation graduation
graduation.class.to_s == "GraduationTopic" ? "毕设选题" : "毕设任务"
@ -1,4 +1,6 @@
json.extract! video, :id, :title, :cover_url, :file_url, :play_url, :vv, :user_id, :transcoded
json.play_url md5_encode(video.play_url)
json.file_url md5_encode(video.file_url)
json.play_duration video.video_play_duration
json.published_at video.display_published_at
json.created_at video.display_created_at