From 51214b085145bc141dd9e8561575b1d0f3352362 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 1 Aug 2019 16:53:32 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/picture_display.json.jbuilder | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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| From 7d206418c770902a20da4acb9d20d0dc67965eca Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 1 Aug 2019 16:55:56 +0800 Subject: [PATCH 2/5] modify library praises count --- app/controllers/libraries_controller.rb | 2 +- app/views/libraries/index.json.jbuilder | 2 +- app/views/libraries/show.json.jbuilder | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/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 From 6a91a4ecb751403beb55a2b21baa70c24f3bba61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 1 Aug 2019 16:56:24 +0800 Subject: [PATCH 3/5] b --- .../PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js | 2 +- public/react/src/modules/user/common.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 493152def..51cd8c8f6 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -189,7 +189,7 @@ 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, 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 From 987a935faee035c578a56b4f7a2a8b71a28358ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 1 Aug 2019 17:01:34 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=20=E4=BC=97=E5=8C=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 51cd8c8f6..ae4983b33 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -192,7 +192,7 @@ class PackageIndexNEIBannerConcent extends Component { var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { - value: contact_phone, + login: contact_phone, type: 5, } }).then((result) => { From c97d9b2acd4eafc0e4b72d6846bae409790912b7 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 1 Aug 2019 17:23:03 +0800 Subject: [PATCH 5/5] fix VerificationCode --- app/services/project_packages/save_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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