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

dev_admin
hjm 6 years ago
commit 02ce449ff5

@ -22,7 +22,7 @@ class LibrariesController < ApplicationController
end end
@count = libraries.count @count = libraries.count
@libraries = paginate libraries.includes(:library_tags, :praise_tread_cache, user: :user_extension) @libraries = paginate libraries.includes(:library_tags, user: :user_extension)
ids = @libraries.map(&:id) ids = @libraries.map(&:id)
@download_count_map = Attachment.where(container_type: 'Library', container_id: ids) @download_count_map = Attachment.where(container_type: 'Library', container_id: ids)

@ -54,7 +54,7 @@ class ProjectPackages::SaveService < ApplicationService
raise Error, '验证码不能为空' if params[:code].blank? raise Error, '验证码不能为空' if params[:code].blank?
code = VerificationCode.where(phone: params[:contact_phone], code_type: 9, code: params[:code]).last code = VerificationCode.where(phone: params[:contact_phone], code_type: 9, code: params[:code]).last
raise Error, '无效的验证码' if code.blank? || !code.valid_code? raise Error, '无效的验证码' if code.blank? || !code.effective?
end end
def deal_attachments def deal_attachments

@ -26,13 +26,13 @@ elsif @type =="qrcode"
json.qrcode_str @qrcode_str json.qrcode_str @qrcode_str
elsif @type == "mp3" || @type == "mp4" elsif @type == "mp3" || @type == "mp4"
if @type == "mp4" if @type == "mp4"
json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171"}] json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171/123.mp4"}]
json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172"}] json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}]
json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173"}] json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}]
else else
json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174"}] json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174/58099.mp3"}]
json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175"}] json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}]
json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175"}] json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}]
end end
# json.orignal_file do # json.orignal_file do
# json.array! @orignal_picture do |file| # json.array! @orignal_picture do |file|

@ -5,7 +5,7 @@ json.libraries do
json.cover_url library.cover_id.present? ? download_url(library.cover) : nil json.cover_url library.cover_id.present? ? download_url(library.cover) : nil
json.praise_count library.praise_tread_cache&.praise_num || 0 json.praise_count library.praises_count
json.download_count @download_count_map.fetch(library.id, 0) json.download_count @download_count_map.fetch(library.id, 0)
json.published_at library.display_published_at json.published_at library.display_published_at

@ -2,7 +2,7 @@ library = current_library
json.extract! library, :id, :uuid, :title, :content, :author_name, :author_school_name, :status, :visited_count json.extract! library, :id, :uuid, :title, :content, :author_name, :author_school_name, :status, :visited_count
json.praise_count library.praise_tread_cache&.praise_num || 0 json.praise_count library.praises_count
json.published_at library.display_published_at json.published_at library.display_published_at
json.created_at library.display_created_at json.created_at library.display_created_at

@ -189,10 +189,10 @@ class PackageIndexNEIBannerConcent extends Component {
//短信验证 //短信验证
SMSverification = () => { SMSverification = () => {
let {contact_phone,code}=this.state; let {contact_phone,code}=this.state;
var url = `/account/get_verification_code.json`; var url = `/accounts/get_verification_code.json`;
axios.get((url), { axios.get((url), {
params: { params: {
value: contact_phone, login: contact_phone,
type: 5, type: 5,
} }
}).then((result) => { }).then((result) => {

@ -264,5 +264,5 @@
margin: 0 auto; margin: 0 auto;
} }
.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
background: #ffffff!important; background: transparent !important;
} }
Loading…
Cancel
Save