From 4b23a9a2b54ea85b7636ba97cf17c83914718903 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 15 Mar 2019 16:53:15 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=9D=9E=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=AE=9E=E8=AE=AD=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E7=9A=84=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 919e374b..3ec38cde 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4340,7 +4340,7 @@ module ApplicationHelper candown = (attachment.is_public == 1 || attachment.is_public == true) end else - if attachment.container_type == "MarkDown" || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" + if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" candown = true end end From 8bbb5a71e03318ee44ca69c632eecd134a179c23 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 15 Mar 2019 16:58:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?markdown=E4=B8=8A=E4=BC=A0=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/subjects/_new_or_edit.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3ec38cde..19c82857 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4340,7 +4340,7 @@ module ApplicationHelper candown = (attachment.is_public == 1 || attachment.is_public == true) end else - if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" + if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == 'Subject' || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" candown = true end end diff --git a/app/views/subjects/_new_or_edit.html.erb b/app/views/subjects/_new_or_edit.html.erb index b5d15a26..9bd72d23 100644 --- a/app/views/subjects/_new_or_edit.html.erb +++ b/app/views/subjects/_new_or_edit.html.erb @@ -78,7 +78,7 @@ placeholder: "请在此输入实训课程的简介", imageUpload : true, imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => @subject.class) %>" //url + imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => 'MarkDown') %>" //url }); md_elocalStorage(shixun_editormd, "subject_desc_<%= User.current.id %>", "desc"); /* --------------------------------- 学习须知 -------------------------------------- */ From 0202c719f0518649bfa07566c736b932635e5c21 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 15 Mar 2019 17:03:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/_new_or_edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/_new_or_edit.html.erb b/app/views/subjects/_new_or_edit.html.erb index 9bd72d23..c7c9beed 100644 --- a/app/views/subjects/_new_or_edit.html.erb +++ b/app/views/subjects/_new_or_edit.html.erb @@ -106,7 +106,7 @@ placeholder: "请在此输入实训课程的学习须知", imageUpload : true, imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => @subject.class) %>" //url + imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => 'MarkDown') %>" //url }); md_elocalStorage(shixun_propaedeutics, "subject_notes_<%= User.current.id %>", "notes"); From 8243b33634edf1eed4411c1c3396fd2ced1b2a32 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 15 Mar 2019 23:26:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 0201fd73..39b7bc98 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -33,10 +33,18 @@ class EcloudController < ApplicationController def trustie_login end - CLIENT_ID = '1022' - CLIENT_SECRET = '2112037a-6d7a-432b-9081-feb1153d8668' - ROOT_URl = 'http://localhost:3000' - SERVER_URL = "https://221.176.54.92:9081/restful/services/" + # 测试环境 + # CLIENT_ID = '1022' + # CLIENT_SECRET = '2112037a-6d7a-432b-9081-feb1153d8668' + # SERVER_URL = "https://221.176.54.92:9081/restful/services/" + # + + # 正式环境 + CLIENT_ID = '1056' + CLIENT_SECRET = '2e84256a-3de4-4713-9e02-10ee88a14592' + SERVER_URL = "https://221.176.53.130:44390/services/" + + ## 签名 def sign(timestamp)