diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 55894aaa6..c7c6029da 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -22,7 +22,7 @@ class LibrariesController < ApplicationController end @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) @download_count_map = Attachment.where(container_type: 'Library', container_id: ids) diff --git a/app/services/project_packages/save_service.rb b/app/services/project_packages/save_service.rb index a876f56b3..8385ac5dd 100644 --- a/app/services/project_packages/save_service.rb +++ b/app/services/project_packages/save_service.rb @@ -54,7 +54,7 @@ class ProjectPackages::SaveService < ApplicationService raise Error, '验证码不能为空' if params[:code].blank? 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 def deal_attachments diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index 8b5271ec5..2bc88fdf4 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -26,13 +26,13 @@ elsif @type =="qrcode" json.qrcode_str @qrcode_str elsif @type == "mp3" || @type == "mp4" if @type == "mp4" - json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171"}] - json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172"}] - json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173"}] + 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/456.mp4"}] + json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}] else - json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174"}] - json.user_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"}] + 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/654058514.mp3"}] + json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] end # json.orignal_file do # json.array! @orignal_picture do |file| diff --git a/app/views/libraries/index.json.jbuilder b/app/views/libraries/index.json.jbuilder index c58d390b0..13ab8d77b 100644 --- a/app/views/libraries/index.json.jbuilder +++ b/app/views/libraries/index.json.jbuilder @@ -5,7 +5,7 @@ json.libraries do 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.published_at library.display_published_at diff --git a/app/views/libraries/show.json.jbuilder b/app/views/libraries/show.json.jbuilder index 0f4b6ea17..e1fc7d781 100644 --- a/app/views/libraries/show.json.jbuilder +++ b/app/views/libraries/show.json.jbuilder @@ -2,7 +2,7 @@ library = current_library 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.created_at library.display_created_at diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 493152def..ae4983b33 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -189,10 +189,10 @@ class PackageIndexNEIBannerConcent extends Component { //短信验证 SMSverification = () => { let {contact_phone,code}=this.state; - var url = `/account/get_verification_code.json`; + var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { - value: contact_phone, + login: contact_phone, type: 5, } }).then((result) => { diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index d23412d07..6d696a676 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -264,5 +264,5 @@ margin: 0 auto; } .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { - background: #ffffff!important; + background: transparent !important; } \ No newline at end of file