From 396d4d73f0521c7ec4ba483b4b2794ea58e89107 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 30 Dec 2019 17:35:35 +0800 Subject: [PATCH 01/35] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E6=94=BE=E5=BC=80?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/polls_controller.rb | 50 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 0c442a613..2539403af 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -722,19 +722,16 @@ class PollsController < ApplicationController un_anonymous = params[:un_anonymous] ? true : false # 统一设置或者分班为0,则更新问卷,并删除问卷分组 if unified_setting || (course_group_ids.size == 0) - params_publish_time = params[:publish_time].present? ? params[:publish_time].to_time : nil - params_end_time = nil - if params[:end_time].blank? - if params_publish_time.present? - params_end_time = params_publish_time + 30.days - end - else - params_end_time = params[:end_time].to_time - end - # params_end_time = params[:end_time].present? ? params[:end_time].to_time : nil - if poll_status == 2 && @poll.publish_time != params_publish_time - normal_status(-1,"不允许修改发布时间") - elsif poll_status == 3 && (@poll.end_time != params_end_time || @poll.publish_time != params_publish_time) + tip_exception("发布时间不能为空") if params[:publish_time].blank? + tip_exception("截止时间不能为空") if params[:end_time].blank? + tip_exception("截止时间不能早于发布时间") if params[:publish_time].to_time > params[:end_time].to_time + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time].to_time > @course.end_date.end_of_day + + params_publish_time = params[:publish_time].to_time + params_end_time = params[:end_time].to_time + + if poll_status != 1 && @poll.publish_time != params_publish_time normal_status(-1,"不允许修改发布时间") elsif params_publish_time.present? && params_end_time.present? && params_end_time < params_publish_time normal_status(-1,"截止时间不能小于发布时间") @@ -761,24 +758,25 @@ class PollsController < ApplicationController total_common_group = poll_groups_ids & total_common #传入的分班与问卷已存在的分班的交集 old_poll_groups = poll_groups_ids - total_common_group #后来传入的分班里,没有了的班级,即需要删除 params_times.each do |t| - course_id = t[:course_group_id] #为数组,可能会设置分班为各个班级id的数组 - poll_publish_time = t[:publish_time].present? ? t[:publish_time].to_time : nil - # poll_end_time = t[:end_time].present? ? t[:end_time].to_time : nil - poll_end_time = nil - if t[:end_time].blank? - if poll_publish_time.present? - poll_end_time = poll_publish_time + 30.days - end - else - poll_end_time = t[:end_time].to_time - end + tip_exception("发布时间不能为空") if t[:publish_time].blank? + tip_exception("截止时间不能为空") if t[:end_time].blank? + tip_exception("截止时间不能早于发布时间") if t[:publish_time].to_time > t[:end_time].to_time + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && t[:end_time].to_time > @course.end_date.end_of_day + + course_id = t[:course_group_id] + poll_publish_time = t[:publish_time].to_time + poll_end_time = t[:end_time].to_time + poll_group = poll_groups.find_in_poll_group("course_group_id",course_id) #判断该分班是否存在 - if poll_group.present? && poll_group.first.end_time <= Time.now && (poll_end_time != poll_group.first.end_time || poll_publish_time != poll_group.first.publish_time) #已截止且时间改变的,则提示错误 + + if poll_group.present? && (poll_group.first.publish_time < Time.now) && (poll_publish_time != poll_group.first.publish_time) error_count += 1 end - if poll_group.present? && poll_group.first.publish_time < Time.now && poll_publish_time != poll_group.first.publish_time + if poll_group.present? && (poll_group.first.publish_time < Time.now && poll_group.first.end_time > Time.now) && (poll_end_time < Time.now) error_count += 1 end + if error_count == 0 common_group = poll_groups_ids & course_id #传入的班级与问卷已存在的班级的交集,即表示已有分班的 new_group_ids = course_id - common_group #新传入的班级id From 85056d3df582971f5136343e1b6b9a7bbcc0d670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 30 Dec 2019 23:45:18 +0800 Subject: [PATCH 02/35] =?UTF-8?q?=E8=B0=83=E6=95=B4md=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E6=8E=A5=E5=8F=A3+=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/common/UrlTool.js | 45 ++++++- public/react/src/common/educoder.js | 2 +- .../modules/comment/CommentItemMDEditor.js | 4 +- .../CompetitionContentsMd.js | 4 +- .../CompetitionContentspdfdownload.js | 6 +- .../modules/courses/busyWork/NewWorkForm.js | 6 +- .../busyWork/common/TabRightComponents.js | 4 +- .../CompetitionContentsMd.js | 4 +- .../CompetitionContentspdfdownload.js | 6 +- .../courses/coursesPublic/CoursesMarkdown.js | 4 +- .../courses/coursesPublic/SelectSetting.js | 4 +- .../courses/coursesPublic/sendResource.js | 4 +- .../exercise/Testpapersettinghomepage.js | 4 +- .../tasks/GraduationTasksSubmitedit.js | 4 +- .../tasks/GraduationTasksSubmitnew.js | 4 +- .../graduation/tasks/GraduationTasksedit.js | 4 +- .../topics/GraduateTopicPostWorksNew.js | 4 +- .../modules/courses/statistics/Statistics.js | 4 +- .../src/modules/forums/MemoDetailMDEditor.js | 4 +- .../modules/forums/MemoDetailMDEditortwo.js | 4 +- public/react/src/modules/forums/MemoNew.js | 2 +- public/react/src/modules/paths/PathNew.js | 110 ++++-------------- .../src/modules/projectPackages/MDEditors.js | 4 +- .../modules/tpm/TPMsettings/oldTPMsettings.js | 6 +- .../modules/tpm/challengesnew/TPMMDEditor.js | 4 +- .../src/modules/tpm/challengesnew/editorMD.js | 4 +- .../tpm/challengesnew/old/TPManswer.js | 4 +- .../modules/tpm/newshixuns/oldNewshixuns.js | 2 +- .../user/usersInfo/banks/NewGtaskForm.js | 4 +- 29 files changed, 118 insertions(+), 147 deletions(-) diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index d7a49ea63..e190bdd98 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -1,3 +1,4 @@ +import md5 from 'md5'; const isDev = window.location.port == 3007; export const TEST_HOST = "https://test-newweb.educoder.net" export function getImageUrl(path) { @@ -68,19 +69,46 @@ export function getUrl2(path, goTest) { } return `${path ? path: ''}`; } +const newopens ="79e33abd4b6588941ab7622aed1e67e8"; +let newtimestamp; +let checkSubmitFlgs = false; +function railsgettimess(proxy) { + if(checkSubmitFlgs===false){ + $.ajax({url:proxy,async:false,success:function(data){ + if(data.status===0){ + newtimestamp=data.message; + } + }}) + checkSubmitFlgs=true + window.setTimeout(function () { + checkSubmitFlgs=false; + }, 3500); + } +} + +export function Railsgettimes() { + railsgettimess(`${getUrl()}/api/main/first_stamp.json`); +} + export function getUploadActionUrl(path, goTest) { - return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + Railsgettimes() + let anewopens=md5(newopens+newtimestamp); + return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`; } export function getUploadActionUrltwo(id) { - - return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + Railsgettimes() + let anewopens=md5(newopens+newtimestamp); + return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` } export function getUploadActionUrlthree() { - - return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + Railsgettimes() + let anewopens=md5(newopens+newtimestamp); + return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` } export function getUploadActionUrlOfAuth(id) { - return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + Railsgettimes() + let anewopens=md5(newopens+newtimestamp); + return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` } export function test(path) { @@ -96,6 +124,11 @@ export function getTaskUrlById(id) { return `/tasks/${id}` } +export function getRandomcode(url) { + Railsgettimes() + let anewopens=md5(newopens+newtimestamp); + return `${url}?&randomcode=${newtimestamp}&client_key=${anewopens}` +} export function htmlEncode(str) { var s = ""; diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 3d11ee3cb..126a42e87 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -2,7 +2,7 @@ // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; -export { getImageUrl as getImageUrl, getUrl as getUrl, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl +export { getImageUrl as getImageUrl, getUrl as getUrl, getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool'; export { default as queryString } from './UrlTool2'; diff --git a/public/react/src/modules/comment/CommentItemMDEditor.js b/public/react/src/modules/comment/CommentItemMDEditor.js index 8c49d356f..0bde1c6a7 100644 --- a/public/react/src/modules/comment/CommentItemMDEditor.js +++ b/public/react/src/modules/comment/CommentItemMDEditor.js @@ -6,7 +6,7 @@ import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import PropTypes from 'prop-types'; import classNames from 'classnames' - +import { getImageUrl, toPath, getUrl,getUploadActionUrl } from 'educoder'; import './CommentItemMDEditor.css' const $ = window.$; @@ -36,7 +36,7 @@ class CommentItemMDEditor extends Component { if( $(`#${initMD_ID} textarea`).length === 1 ) { // 没有初始化 const placeholder = '我要回复...' // const imageUrl = `/upload_with_markdown?container_id=${commentId}&container_type=Memo`; - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; const otherOptions = { watch: false, diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js index 049f2bab1..9ea972177 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import {Button, Card, Row, Col ,Upload,Icon,message,Tabs} from 'antd'; import axios from 'axios'; -import {getImageUrl,getUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; +import {getUploadActionUrl,getUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; const { TabPane } = Tabs; class CompetitionContentsMd extends Component{ @@ -184,7 +184,7 @@ class CompetitionContentsMd extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleContentUploadChange, onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), beforeUpload: (file) => { diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js index eb304e007..360d65937 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import {Button,Layout,Row, Col,Divider,Table} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,getRandomcode} from 'educoder'; import './CompetitionContentspdfdownload.css'; // import NoneData from "../../../courses/shixunHomework/shixunHomework"; @@ -158,7 +158,7 @@ class CompetitionContentspdfdownload extends Component{ return( - 立即下载 ) @@ -172,7 +172,7 @@ class CompetitionContentspdfdownload extends Component{ return( - 立即下载 ) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index 81851d2f2..6740f7579 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -3,7 +3,7 @@ import { Input, InputNumber, Form, Button, Checkbox, Upload, Icon, message, Moda import axios from 'axios' import '../css/busyWork.css' import '../css/Courses.css' -import { WordsBtn, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder' +import {getUploadActionUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder' import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import CBreadcrumb from '../common/CBreadcrumb' @@ -333,7 +333,7 @@ class NewWorkForm extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleContentUploadChange, onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), beforeUpload: (file) => { @@ -352,7 +352,7 @@ class NewWorkForm extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleAnswerUploadChange, onRemove: (file) => this.onAttachmentRemove(file, 'answerFileList'), beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/busyWork/common/TabRightComponents.js b/public/react/src/modules/courses/busyWork/common/TabRightComponents.js index 9c8f96cc2..41e03d176 100644 --- a/public/react/src/modules/courses/busyWork/common/TabRightComponents.js +++ b/public/react/src/modules/courses/busyWork/common/TabRightComponents.js @@ -150,8 +150,8 @@ class TabRightComponents extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js index 049f2bab1..9ea972177 100644 --- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js +++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import {Button, Card, Row, Col ,Upload,Icon,message,Tabs} from 'antd'; import axios from 'axios'; -import {getImageUrl,getUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; +import {getUploadActionUrl,getUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; const { TabPane } = Tabs; class CompetitionContentsMd extends Component{ @@ -184,7 +184,7 @@ class CompetitionContentsMd extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleContentUploadChange, onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js index eb304e007..360d65937 100644 --- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js +++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import {Button,Layout,Row, Col,Divider,Table} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,getRandomcode} from 'educoder'; import './CompetitionContentspdfdownload.css'; // import NoneData from "../../../courses/shixunHomework/shixunHomework"; @@ -158,7 +158,7 @@ class CompetitionContentspdfdownload extends Component{ return( - 立即下载 ) @@ -172,7 +172,7 @@ class CompetitionContentspdfdownload extends Component{ return( - 立即下载 ) diff --git a/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js b/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js index fea6c79be..7b996480c 100644 --- a/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js +++ b/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js @@ -6,7 +6,7 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; // import "antd/dist/antd.css"; -import { getImageUrl, toPath, getUrl } from 'educoder'; +import { getImageUrl, toPath, getUrl,getUploadActionUrl } from 'educoder'; import axios from 'axios'; @@ -171,7 +171,7 @@ export default class CoursesMarkdown extends Component { // const placeholder = ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd const answers_editormd = create_editorMD(_id, '100%', 400, placeholder, imageUrl, () => { diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index ea87e8bb2..337b4d2e8 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import { Modal,Checkbox,Select,Input,Upload,Button,Icon,message,DatePicker,Tooltip,Radio} from "antd"; import axios from'axios'; -import {getUrl,handleDateString,appendFileSizeToUploadFileAll} from 'educoder'; +import {getUrl,handleDateString,appendFileSizeToUploadFileAll,getUploadActionUrl} from 'educoder'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import moment from 'moment'; import Modals from '../../modals/Modals'; @@ -264,7 +264,7 @@ class Selectsetting extends Component{ const uploadProps = { width: 600, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js index 73a0f6630..0f4e3cfbe 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResource.js +++ b/public/react/src/modules/courses/coursesPublic/sendResource.js @@ -2,7 +2,7 @@ import React,{ Component } from "react"; import { Modal,Checkbox,Upload,Button,Icon,message,DatePicker,Select,Tooltip,Radio} from "antd"; import axios from 'axios'; import Modals from '../../modals/Modals'; -import {getUrl,handleDateString,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; +import {getUploadActionUrl,handleDateString,appendFileSizeToUploadFileAll} from 'educoder'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import moment from 'moment'; const CheckboxGroup = Checkbox.Group; @@ -246,7 +246,7 @@ class Sendresource extends Component{ const uploadProps = { width: 600, // showUploadList:false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index ab662555d..ca4a0758a 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd"; import {Link,NavLink} from 'react-router-dom'; -import { WordsBtn ,ActionBtn,queryString,downloadFile} from 'educoder'; +import { WordsBtn ,ActionBtn,queryString,getRandomcode} from 'educoder'; import CoursesListType from '../coursesPublic/CoursesListType'; import '../css/members.css'; import '../css/busyWork.css'; @@ -404,7 +404,7 @@ class Testpapersettinghomepage extends Component{ :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 7ac909958..f535c01bb 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -2,7 +2,7 @@ import React,{Component} from "react"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl ,bytesToSize,getImageUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; +import { WordsBtn,getUploadActionUrl ,bytesToSize,getImageUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; const Search = Input.Search; @@ -512,7 +512,7 @@ class GraduationTasksSubmitedit extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index d505ba15d..4918c1f6e 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -3,7 +3,7 @@ import React,{Component} from "react"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl,getImageUrl,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; +import { WordsBtn,getUrl,getImageUrl,getUploadActionUrl,appendFileSizeToUploadFileAll} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; const Search = Input.Search; @@ -536,7 +536,7 @@ render(){ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index b530a4de6..1a9c1490e 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -2,7 +2,7 @@ import React,{Component} from "react"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll,AttachmentList,appendFileSizeToUploadFile} from 'educoder'; +import { WordsBtn,getUrl ,getUploadActionUrl,appendFileSizeToUploadFileAll,AttachmentList,appendFileSizeToUploadFile} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; @@ -314,7 +314,7 @@ class GraduationTasksedit extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js index 38e68ad32..6d4d08743 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js @@ -7,7 +7,7 @@ import { } from 'antd'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' -import {getUrl} from 'educoder'; +import {getUrl,getUploadActionUrl} from 'educoder'; import "../../common/formCommon.css" // import './board.css' @@ -248,7 +248,7 @@ class GraduateTopicPostWorksNew extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file) => { diff --git a/public/react/src/modules/courses/statistics/Statistics.js b/public/react/src/modules/courses/statistics/Statistics.js index 281052426..d0f47e21a 100644 --- a/public/react/src/modules/courses/statistics/Statistics.js +++ b/public/react/src/modules/courses/statistics/Statistics.js @@ -1,6 +1,6 @@ import React,{ Component } from "react"; import {Table, Pagination,Popover,Spin, Row, Col ,Tabs, Icon} from "antd"; -import { WordsBtn,on, off, trigger ,getImageUrl,sortDirections} from 'educoder'; +import { WordsBtn,on, off, getRandomcode ,getImageUrl,sortDirections} from 'educoder'; import axios from'axios'; import Dropdownbox from './Dropdownbox'; import Dynamiclist from './Dynamiclist'; @@ -172,7 +172,7 @@ class Statistics extends Component{ } }) - this.props.slowDownload(`${url}?${urllist}`); + this.props.slowDownload(getRandomcode(`${url}?${urllist}`)); } diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index 6e2563b9b..57a48fe91 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames' -import { isDev } from 'educoder' +import { getUploadActionUrl } from 'educoder' import './MemoDetailEditor.css' @@ -36,7 +36,7 @@ class MemoDetailMDEditor extends Component { // 因为props.memo不存在时,本组件不会被加载,这里直接在didMount里初始化即可 const placeholder = '我要回复...' // const imageUrl = `/upload_with_markdown?container_id=${this.props.memo.id}&container_type=Memo`; - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; if (this.isMDInited) { return; } diff --git a/public/react/src/modules/forums/MemoDetailMDEditortwo.js b/public/react/src/modules/forums/MemoDetailMDEditortwo.js index cc3a2b1af..eafc1451f 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditortwo.js +++ b/public/react/src/modules/forums/MemoDetailMDEditortwo.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames' -import { isDev } from 'educoder' +import { getUploadActionUrl } from 'educoder' import './MemoDetailEditor.css' @@ -35,7 +35,7 @@ class MemoDetailMDEditortwo extends Component { // 因为props.memo不存在时,本组件不会被加载,这里直接在didMount里初始化即可 const placeholder = '我要回复...' // const imageUrl = `/upload_with_markdown?container_id=${this.props.memo.id}&container_type=Memo`; - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 执行太快了,样式不正常 window.__tt = 400; diff --git a/public/react/src/modules/forums/MemoNew.js b/public/react/src/modules/forums/MemoNew.js index fbbd88044..a9e7d6668 100644 --- a/public/react/src/modules/forums/MemoNew.js +++ b/public/react/src/modules/forums/MemoNew.js @@ -441,7 +441,7 @@ class MemoNew extends Component { // amp; // 编辑时要传memoId // const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`; - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js index d9da9c0d4..8fdbf918f 100644 --- a/public/react/src/modules/paths/PathNew.js +++ b/public/react/src/modules/paths/PathNew.js @@ -2,6 +2,7 @@ import React,{ Component } from "react"; import {getUrl,markdownToHTML} from 'educoder'; import {Input,Button} from 'antd'; +import TPMMDEditor from "../tpm/challengesnew/TPMMDEditor"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import axios from 'axios'; @@ -11,79 +12,11 @@ require('codemirror/lib/codemirror.css'); const $ = window.$; -let origin = getUrl(); -let path = getUrl("/editormd/lib/"); -function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callback) { - var editorName = window.editormd(id, { - width: width, - height: high, - path: path, // "/editormd/lib/" - markdown : initValue, - syncScrolling: "single", - tex: true, - tocm: true, - emoji: true, - taskList: true, - codeFold: true, - searchReplace: true, - htmlDecode: "style,script,iframe", - sequenceDiagram: true, - autoFocus: false, - placeholder: placeholder, - toolbarIcons: function () { - // Or return editormd.toolbarModes[name]; // full, simple, mini - // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] - }, - toolbarCustomIcons: { - testIcon: "
    ", - testIcon1: "
    " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea: true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity: 0.6, - imageUpload: true, - imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL: imageUrl,//url - onload: function () { - // this.previewing(); - var id = this.id; - var editorName = this; - $("#" + id + " [type=\"latex\"]").bind("click", function () { - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line - 1, 0); - }); - - $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("`$$$$`"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - - callback && callback() - } - }); - // 一个页面有多个md时,onload方法只执行了一次 - // window.md_elocalStorage(editorName, `MemoQuestion_${id}`, `${id}`); - - return editorName; -} - - - - class PathNew extends Component{ constructor(props){ super(props); + this.contentMdRef = React.createRef(); + this.Point_editMD = React.createRef(); this.state={ pathName:"", description:"", @@ -104,7 +37,7 @@ class PathNew extends Component{ }) return; } - let des=this.Des_editMD.getValue(); + let des= this.contentMdRef.current.getValue().trim(); if(des===""){ this.props.showSnackbar("请输入实践课程的简介"); window.location.href="#part_Des"; @@ -115,7 +48,7 @@ class PathNew extends Component{ window.location.href="#part_Des"; return; } - let point = this.Point_editMD.getValue(); + let point = this.Point_editMD.current.getValue().trim(); if(point===""){ this.props.showSnackbar("请输入实践课程的学习须知"); window.location.href="#part_point"; @@ -207,13 +140,9 @@ class PathNew extends Component{ this.setState({ pathName: response.data.name }) + this.contentMdRef.current.setValue(response.data && response.data.description); + this.Point_editMD.current.setValue(response.data && response.data.learning_notes); - const Des_editMD = create_editorMD("shixun_introduction","100%","490px" - ,"请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json", response.data.description,""); - this.Des_editMD=Des_editMD; - const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px" - ,"请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json",response.data.learning_notes,""); - this.Point_editMD=Point_editMD; } }).catch((error)=>{ console.log(error); @@ -221,10 +150,8 @@ class PathNew extends Component{ } else { this.isEditPage = false - const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json","",""); - this.Des_editMD=Des_editMD; - const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json","",""); - this.Point_editMD=Point_editMD; + this.contentMdRef.current.setValue(""); + this.Point_editMD.current.setValue(""); } } @@ -266,8 +193,14 @@ class PathNew extends Component{
    *
    -
    - +
    + {/**/} + +

    @@ -280,8 +213,13 @@ class PathNew extends Component{
    *
    -
    - +
    + {/**/} +

    diff --git a/public/react/src/modules/projectPackages/MDEditors.js b/public/react/src/modules/projectPackages/MDEditors.js index abd1d2da8..ab69aa83c 100644 --- a/public/react/src/modules/projectPackages/MDEditors.js +++ b/public/react/src/modules/projectPackages/MDEditors.js @@ -4,7 +4,7 @@ import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal} from 'antd'; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; -import { getImageUrl, toPath, getUrl } from 'educoder'; +import { getImageUrl, getUploadActionUrl, getUrl } from 'educoder'; require('codemirror/lib/codemirror.css'); @@ -222,7 +222,7 @@ export default class MDEditors extends Component { const _placeholder = placeholder || ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd let react_id = `react_${_id}`; diff --git a/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js b/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js index 8688e9669..3c42b38db 100644 --- a/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/oldTPMsettings.js @@ -15,7 +15,7 @@ import axios from 'axios'; import './css/TPMsettings.css'; -import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder'; +import { getImageUrl, toPath, getUrl ,getUploadActionUrl} from 'educoder'; let origin = getUrl(); @@ -280,7 +280,7 @@ export default class TPMsettings extends Component { const placeholder = ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd const description_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { @@ -307,7 +307,7 @@ export default class TPMsettings extends Component { const placeholder = ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd const evaluate_script_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 22326e9e7..64cc373dc 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -6,7 +6,7 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; // import "antd/dist/antd.css"; -import { getImageUrl, toPath, getUrl } from 'educoder'; +import { getImageUrl, getUploadActionUrl, getUrl } from 'educoder'; import '../../courses/css/Courses.css' import axios from 'axios'; @@ -226,7 +226,7 @@ export default class TPMMDEditor extends Component { const _placeholder = placeholder || ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd let react_id = `react_${_id}`; // 将实例存到了window diff --git a/public/react/src/modules/tpm/challengesnew/editorMD.js b/public/react/src/modules/tpm/challengesnew/editorMD.js index 50f15b601..26d21d86a 100644 --- a/public/react/src/modules/tpm/challengesnew/editorMD.js +++ b/public/react/src/modules/tpm/challengesnew/editorMD.js @@ -1,6 +1,6 @@ import React, {Component} from 'react'; -import {getUrl} from 'educoder'; +import {getUrl,getUploadActionUrl} from 'educoder'; let path = getUrl("/editormd/lib/"); @@ -85,7 +85,7 @@ export default class TPMeditorMD extends Component { // amp; // 编辑时要传memoId // const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`; - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd let questio_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, () => { diff --git a/public/react/src/modules/tpm/challengesnew/old/TPManswer.js b/public/react/src/modules/tpm/challengesnew/old/TPManswer.js index 7d090c607..350a5ca8d 100644 --- a/public/react/src/modules/tpm/challengesnew/old/TPManswer.js +++ b/public/react/src/modules/tpm/challengesnew/old/TPManswer.js @@ -6,7 +6,7 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; // import "antd/dist/antd.css"; -import { getImageUrl, toPath, getUrl } from 'educoder'; +import { getImageUrl, getUploadActionUrl, getUrl } from 'educoder'; import axios from 'axios'; @@ -170,7 +170,7 @@ export default class TPManswer extends Component { const placeholder = ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `${getUploadActionUrl()}`; // 创建editorMd const answers_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, () => { diff --git a/public/react/src/modules/tpm/newshixuns/oldNewshixuns.js b/public/react/src/modules/tpm/newshixuns/oldNewshixuns.js index 1eaee9ad6..4904219bb 100644 --- a/public/react/src/modules/tpm/newshixuns/oldNewshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/oldNewshixuns.js @@ -243,7 +243,7 @@ class Newshixuns extends Component { const placeholder = ""; // amp; // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; + const imageUrl = `getUploadActionUrl`; // 创建editorMd const taskpass_editormd = create_editorMD("memoMD", '100%', 400, placeholder, imageUrl, () => { diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js index 8c0f6474c..70994e42d 100644 --- a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js +++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import { Input, InputNumber, Form, Button, Checkbox, Upload, Icon, message, Modal } from "antd"; import axios from 'axios' -import { WordsBtn, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder' +import { getUploadActionUrl, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder' import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; const $ = window.$; const MAX_TITLE_LENGTH = 60; @@ -191,7 +191,7 @@ class NewGtaskForms extends Component{ // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, + action: `${getUploadActionUrl()}`, onChange: this.handleContentUploadChange, onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'), beforeUpload: (file) => { From 103d3b3fb94df8409bccc7281d937296181751c0 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 09:09:43 +0800 Subject: [PATCH 03/35] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4faa42107..ac53343b5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,21 +23,21 @@ class ApplicationController < ActionController::Base # 所有请求必须合法签名 def check_sign - # Rails.logger.info("66666 #{params}") - # suffix = request.url.split(".").last - # suffix_arr = ["xls", "xlsx"] # excel文件先注释 - # unless suffix_arr.include?(suffix) - # if params[:client_key].present? - # randomcode = params[:randomcode] - # tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5) - # - # sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}") - # Rails.logger.info("2222 #{sign}") - # tip_exception(501, "请求不合理") if sign != params[:client_key] - # else - # tip_exception(501, "请求不合理") - # end - # end + Rails.logger.info("66666 #{params}") + suffix = request.url.split(".").last + suffix_arr = ["xls", "xlsx"] # excel文件先注释 + unless suffix_arr.include?(suffix) + if params[:client_key].present? + randomcode = params[:randomcode] + tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5) + + sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}") + Rails.logger.info("2222 #{sign}") + tip_exception(501, "请求不合理") if sign != params[:client_key] + else + tip_exception(501, "请求不合理") + end + end end # 全局配置参数 From 0d389504ebd5d34bf427d8f8fbb489b55563dcc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 09:10:20 +0800 Subject: [PATCH 04/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ++-- public/react/src/common/UrlTool.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 6759fc334..24493dd13 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -51,7 +51,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 3500); + }, 2500); }else if(checkSubmitFlg===false){ $.ajax({url:proxy,async:false,success:function(data){ if(data.status===0){ @@ -61,7 +61,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 3500); + }, 2500); } } window._debugType = debugType; diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index e190bdd98..33a84dc55 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -1,4 +1,5 @@ import md5 from 'md5'; +const $ = window.$; const isDev = window.location.port == 3007; export const TEST_HOST = "https://test-newweb.educoder.net" export function getImageUrl(path) { @@ -82,7 +83,7 @@ function railsgettimess(proxy) { checkSubmitFlgs=true window.setTimeout(function () { checkSubmitFlgs=false; - }, 3500); + }, 2500); } } From 1d14840b9fbceceee88e6bd6d23273e66ae45d70 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 09:29:33 +0800 Subject: [PATCH 05/35] fixbug --- app/controllers/hacks_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/hacks_controller.rb b/app/controllers/hacks_controller.rb index e5ca0dc1d..3eaac0648 100644 --- a/app/controllers/hacks_controller.rb +++ b/app/controllers/hacks_controller.rb @@ -44,12 +44,13 @@ class HacksController < ApplicationController begin logger.info("##########{hack_params}") hack = Hack.new(hack_params) + hack.user_id = current_user.id + hack.identifier = generate_identifier Hack, 8 ActiveRecord::Base.transaction do - hack.user_id = current_user.id - hack.identifier = generate_identifier Hack, 8 hack.save! # 创建测试集与代码 hack.hack_sets.create!(hack_sets_params) + # 新建知识点 hack_codes = hack.hack_codes.new(hack_code_params) hack_codes.modify_time = Time.now hack_codes.save! From 253b426ba92b7e13cf98ed8b8a7f99862fe3658a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 31 Dec 2019 11:12:53 +0800 Subject: [PATCH 06/35] =?UTF-8?q?=E4=B8=80=E9=94=AE=E8=AF=84=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homework_commons_controller.rb | 197 +----------------- app/jobs/homework_batch_comment_job.rb | 29 +++ config/routes.rb | 1 + spec/jobs/homework_batch_comment_job_spec.rb | 5 + 4 files changed, 44 insertions(+), 188 deletions(-) create mode 100644 app/jobs/homework_batch_comment_job.rb create mode 100644 spec/jobs/homework_batch_comment_job_spec.rb diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 89f65c61d..6efa081f0 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -11,7 +11,7 @@ class HomeworkCommonsController < ApplicationController before_action :find_homework, only: [:edit, :show, :update, :group_list, :homework_code_repeat, :code_review_results, :code_review_detail, :show_comment, :settings, :works_list, :update_settings, :reference_answer, :publish_groups, :end_groups, :alter_name, :update_explanation, - :update_score, :update_student_score] + :update_score, :update_student_score, :batch_comment] before_action :user_course_identity before_action :homework_publish, only: [:show, :works_list, :code_review_results, :show_comment, :settings, :reference_answer, :update_student_score] @@ -19,7 +19,7 @@ class HomeworkCommonsController < ApplicationController :publish_homework, :end_homework, :set_public, :choose_category, :move_to_category, :choose_category, :create_subject_homework, :multi_destroy, :group_list, :homework_code_repeat, :code_review_results, :code_review_detail, :update_explanation, :update_settings, - :add_to_homework_bank, :publish_groups, :end_groups] + :add_to_homework_bank, :publish_groups, :end_groups, :batch_comment] before_action :require_id_params, only: [:set_public, :multi_destroy, :publish_homework, :end_homework, :move_to_category, :add_to_homework_bank] before_action :course_manager, only: [:alter_name] @@ -453,105 +453,8 @@ class HomeworkCommonsController < ApplicationController # 课堂结束后不能再更新 unless @course.is_end + # 发布设置 UpdateHomeworkPublishSettingService.call(@homework, publish_params) - # 作业未发布时,unified_setting参数不能为空 -=begin - if @homework.publish_time.nil? || @homework.publish_time > Time.now - tip_exception("缺少统一设置的参数") if params[:unified_setting].nil? - if params[:unified_setting] || @course.course_groups_count == 0 - tip_exception("发布时间不能为空") if params[:publish_time].blank? - tip_exception("截止时间不能为空") if params[:end_time].blank? - tip_exception("发布时间不能早于当前时间") if params[:publish_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") - tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") - tip_exception("截止时间不能早于发布时间") if params[:publish_time] > params[:end_time] - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if - @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day - - @homework.unified_setting = 1 - @homework.homework_group_settings.destroy_all - @homework.publish_time = params[:publish_time] - # 截止时间为空时取发布时间后一个月 - @homework.end_time = params[:end_time] - - else - tip_exception("分班发布设置不能为空") if params[:group_settings].blank? - # 创建作业的分班设置 - create_homework_group_settings @homework - - setting_group_ids = [] - - params[:group_settings].each do |setting| - tip_exception("分班id不能为空") if setting[:group_id].length == 0 - tip_exception("发布时间不能为空") if setting[:publish_time].blank? - tip_exception("截止时间不能为空") if setting[:end_time].blank? - tip_exception("发布时间不能早于当前时间") if setting[:publish_time] <= strf_time(Time.now) - tip_exception("截止时间不能早于当前时间") if setting[:end_time] <= strf_time(Time.now) - tip_exception("截止时间不能早于发布时间") if setting[:publish_time] > setting[:end_time] - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if - @course.end_date.present? && setting[:end_time] > @course.end_date.end_of_day - - - publish_time = setting[:publish_time] == "" ? Time.now : setting[:publish_time] - # 截止时间为空时取发布时间后一个月 - end_time = setting[:end_time] - HomeworkGroupSetting.where(homework_common_id: @homework.id, course_group_id: setting[:group_id]). - update_all(publish_time: publish_time, end_time: end_time) - setting_group_ids << setting[:group_id] - end - - # 未设置的分班:发布时间和截止时间都为nil - HomeworkGroupSetting.where.not(course_group_id: setting_group_ids).where(homework_common_id: @homework.id). - update_all(publish_time: nil, end_time: nil) - - # 记录已发布需要发消息的分班 - publish_group_ids = HomeworkGroupSetting.where(homework_common_id: @homework.id).group_published.pluck(:course_group_id) - - @homework.unified_setting = 0 - @homework.publish_time = @homework.min_group_publish_time - @homework.end_time = @homework.max_group_end_time - end - - # 如果作业立即发布则更新状态、发消息 - if @homework.publish_time <= Time.now and @homework_detail_manual.comment_status == 0 - @homework_detail_manual.comment_status = 1 - send_tiding = true - end - - # 作业在"提交中"状态时 - else - if @homework.end_time > Time.now && @homework.unified_setting - tip_exception("截止时间不能为空") if params[:end_time].blank? - tip_exception("截止时间不能早于当前时间") if params[:end_time] <= strf_time(Time.now) - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if - @course.end_date.present? && params[:end_time] > strf_time(@course.end_date.end_of_day) - - @homework.end_time = params[:end_time] - - elsif !@homework.unified_setting - create_homework_group_settings @homework - tip_exception("分班发布设置不能为空") if params[:group_settings].blank? - params[:group_settings].each do |setting| - group_settings = HomeworkGroupSetting.where(homework_common_id: @homework.id, course_group_id: setting[:group_id]) - - tip_exception("分班id不能为空") if setting[:group_id].length == 0 - tip_exception("发布时间不能为空") if setting[:publish_time].blank? - tip_exception("截止时间不能为空") if setting[:end_time].blank? - # 如果该发布规则 没有已发布的分班则需判断发布时间 - tip_exception("发布时间不能早于等于当前时间") if setting[:publish_time] <= strf_time(Time.now) && group_settings.group_published.count == 0 - - tip_exception("截止时间不能早于等于当前时间") if setting[:end_time] <= strf_time(Time.now) && group_settings.none_end.count > 0 - tip_exception("截止时间不能早于发布时间") if setting[:publish_time] > setting[:end_time] - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if - @course.end_date.present? && setting[:end_time] > strf_time(@course.end_date.end_of_day) - - group_settings.none_published.update_all(publish_time: setting[:publish_time]) - group_settings.none_end.update_all(end_time: setting[:end_time]) - end - - @homework.end_time = @homework.max_group_end_time - end - end -=end # 补交设置 tip_exception("缺少allow_late参数") if params[:allow_late].nil? @@ -880,69 +783,6 @@ class HomeworkCommonsController < ApplicationController ## 分页参数 page = params[:page] || 1 @shixuns = @shixuns.reorder("shixuns.created_at desc").includes(:challenges, user: [user_extension: :school]).page(page).per(10) - - # 新版用下面的代码 - # ## 我的实训 - # @shixuns = - # if params[:order_by] == 'mine' - # current_user.my_shixuns.unhidden - # else - # if current_user.admin? - # Shixun.unhidden - # else - # none_shixun_ids = ShixunSchool.where("school_id != #{current_user.school_id}").pluck(:shixun_id) - # - # @shixuns = Shixun.where.not(id: none_shixun_ids).unhidden - # end - # end - # - # ## 方向 - # if params[:tag_level].present? && params[:tag_id].present? - # @shixuns = @shixuns.filter_tag(params[:tag_level].to_i, params[:tag_id].to_i) - # case params[:tag_level].to_i - # when 1 #大类 - # @search_tags = Repertoire.find(params[:tag_id].to_i).name - # when 2 #子类 - # @search_tags = SubRepertoire.find(params[:tag_id].to_i).name - # when 3 #tag - # tag = TagRepertoire.find(params[:tag_id].to_i) - # @search_tags = "#{tag.sub_repertoire.name} / #{tag.name}" - # end - # end - # - # ## 搜索关键字创建者、实训名称、院校名称 - # if params[:keyword].present? - # keyword = params[:keyword].strip - # @shixuns = @shixuns.joins(user: [user_extenison: :school]). - # where("schools.name like '%#{keyword}%' - # or concat(lastname, firstname) like '%#{keyword}%' - # or shixuns.name like '%#{keyword.split(" ").join("%")}%'").distinct - # end - # - # ## 筛选 难度 - # if params[:diff].present? && params[:diff].to_i != 0 - # @shixuns = @shixuns.where(trainee: params[:diff]) - # end - # - # ## 排序参数 - # bsort = params[:sort] || 'desc' - # case params[:order_by] || 'hot' - # when 'hot' - # @shixuns = @shixuns.order("myshixuns_count #{bsort}") - # when 'mine' - # @shixuns = @shixuns.order("shixuns.created_at #{bsort}") - # else - # @shixuns = @shixuns.order("myshixuns_count #{bsort}") - # end - # - # @total_count = @shixuns.count - # - # ## 分页参数 - # page = params[:page] || 1 - # limit = params[:limit] || 15 - # - # @shixuns = @shixuns.includes(:challenges, user: [user_extension: :school]).page(page).per(limit) - # end def create_shixun_homework @@ -1248,31 +1088,6 @@ class HomeworkCommonsController < ApplicationController # homework_challenge_settings = homework.homework_challenge_settings unless student_works.blank? student_works.joins(:myshixun).where("myshixuns.status != 1").update_all(late_penalty: homework.late_penalty) if homework.allow_late - -=begin - student_works.where("work_status != 0").includes(:myshixun).each do |student_work| - unless student_work.myshixun.is_complete? - student_work.update_attributes(work_status: 2, late_penalty: homework.late_penalty) - student_work.late_penalty = homework.late_penalty - end - HomeworksService.new.set_shixun_final_score student_work, student_work.myshixun, homework_detail_manual.answer_open_evaluation, - homework_challenge_settings - end - - student_works.where("work_status = 0").each do |student_work| - myshixun = Myshixun.where(shixun_id: shixun.id, user_id: student_work.user_id).first - if myshixun.present? - student_work.update_attributes(work_status: (myshixun.is_complete? ? 1 : 2), - late_penalty: myshixun.is_complete? ? 0 : homework.late_penalty, - commit_time: myshixun.created_at, myshixun_id: myshixun.id) - student_work.late_penalty = myshixun.is_complete? ? 0 : homework.late_penalty - HomeworksService.new.set_shixun_final_score student_work, myshixun, homework_detail_manual.answer_open_evaluation, - homework_challenge_settings - end - end -=end - - # 更新所有学生的效率分(重新取homework确保是更新后的) end end homework.save! @@ -1558,6 +1373,12 @@ class HomeworkCommonsController < ApplicationController end + def batch_comment + tip_exception(-1, "作业还未发布,不能评阅") if @homework_detail_manual.comment_status == 0 + tip_exception("请至少输入一个评阅") if params[:comment].blank? && params[:hidden_comment].blank? + + end + private def find_homework diff --git a/app/jobs/homework_batch_comment_job.rb b/app/jobs/homework_batch_comment_job.rb new file mode 100644 index 000000000..d12e29a1b --- /dev/null +++ b/app/jobs/homework_batch_comment_job.rb @@ -0,0 +1,29 @@ +# 作业的一键评阅 +class HomeworkBatchCommentJob < ApplicationJob + queue_as :default + + def perform(comment, hidden_comment, work_ids, homework_id, user_id) + # Do something later + homework = HomeworkCommon.find_by(id: homework_id) + return if homework.blank? + + attrs = %i[student_work_id challenge_id user_id comment hidden_comment] + + same_attrs = { + challenge_id: 0, user_id: user_id, container_type: 'Exercise', + parent_container_id: exercise.id, parent_container_type: 'ExercisePublish', + belong_container_id: exercise.course_id, belong_container_type: 'Course', + viewed: 0, tiding_type: 'Exercise' + } + + StudentWork.bulk_insert(*attrs) do |worker| + student_ids.each do |user_id| + same_attrs = {user_id: user_id} + course.homework_commons.where(homework_type: %i[normal group practice]).each do |homework| + next if StudentWork.where(user_id: user_id, homework_common_id: homework.id).any? + worker.add same_attrs.merge(homework_common_id: homework.id) + end + end + end + end +end diff --git a/config/routes.rb b/config/routes.rb index f9ed12dbe..b27095984 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -512,6 +512,7 @@ Rails.application.routes.draw do post :alter_name get :update_score get :update_student_score + post :batch_comment end collection do diff --git a/spec/jobs/homework_batch_comment_job_spec.rb b/spec/jobs/homework_batch_comment_job_spec.rb new file mode 100644 index 000000000..e2352f104 --- /dev/null +++ b/spec/jobs/homework_batch_comment_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe HomeworkBatchCommentJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end From 05038761ba7411a73ab4c06ad46ea65ed0014e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:22:57 +0800 Subject: [PATCH 07/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 24493dd13..b0d0b2f3f 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -51,7 +51,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 2500); + }, 2000); }else if(checkSubmitFlg===false){ $.ajax({url:proxy,async:false,success:function(data){ if(data.status===0){ @@ -61,7 +61,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 2500); + }, 2000); } } window._debugType = debugType; @@ -224,6 +224,7 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 501) { + window.location.reload() notification.warning({ description:response.data.message || '访问异常,请求不合理', }) From be32f935c519fdaef324ae36c89b3ff5ca33ecdb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 11:28:02 +0800 Subject: [PATCH 08/35] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0339d2c38..f336205cd 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -285,7 +285,7 @@ class ApplicationController < ActionController::Base # # reacct静态资源加载不需要走这一步 return if params[:controller] == "main" # Find the current user - Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}") + #Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}") User.current = find_current_user uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) From 99d00d389f2f7a624e4c7a95cd72c620cd5b4270 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 11:29:53 +0800 Subject: [PATCH 09/35] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/cooperative/base_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/cooperative/base_controller.rb b/app/controllers/cooperative/base_controller.rb index dfc99b7b8..5d21598aa 100644 --- a/app/controllers/cooperative/base_controller.rb +++ b/app/controllers/cooperative/base_controller.rb @@ -10,6 +10,7 @@ class Cooperative::BaseController < ApplicationController before_action :laboratory_exist!, :require_login, :require_cooperative_manager! after_action :rebind_event_if_ajax_render_partial + skip_before_action :check_sign helper_method :current_laboratory, :current_setting_or_default From 6eebb13501deb7721f15770a1fbd3613b37eae22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:37:03 +0800 Subject: [PATCH 10/35] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=81=9C=E7=95=99?= =?UTF-8?q?=E6=8A=A5501=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index b0d0b2f3f..ad6a30608 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -14,6 +14,17 @@ broadcastChannelOnmessage('refreshPage', () => { window.location.reload() }) +window.addEventListener('pageshow', function(event) { + if(event.persisted) { // ios 有效, android 和 pc 每次都是 false + window.location.reload(); + } else { // ios 除外 + if(sessionStorage.getItem('refresh') === 'true') { + window.location.reload(); + } + } + sessionStorage.removeItem('refresh'); +}); + function locationurl(list){ if (window.location.port === "3007") { @@ -224,10 +235,16 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 501) { - window.location.reload() - notification.warning({ - description:response.data.message || '访问异常,请求不合理', + notification.open({ + message:"提示", + description:response.data.message?response.data.message+",将在1秒钟后刷新页面" : '访问异常,请求不合理,将在1秒钟后刷新页面', + style: { + zIndex: 99999999 + } }) + window.setTimeout(function () { + window.location.reload() + }, 1500); } From 69f5b5438b938aca1c6db6fe47650ad4425d3c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:55:25 +0800 Subject: [PATCH 11/35] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/index.html | 11 +++++++++++ public/react/src/AppConfig.js | 17 ++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/public/react/public/index.html b/public/react/public/index.html index 303128b18..c3fe6f571 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -158,6 +158,17 @@