From a38ba5c7e230010989f571837f1aa4b5a1bc7b36 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 29 Apr 2020 10:42:53 +0800 Subject: [PATCH] update --- public/js/editormd/editormd.min.js | 6 +++--- src/App.js | 2 +- src/common/UrlTool.js | 31 +++++++--------------------- src/forge/Main/CoderRootDirectory.js | 7 +++---- src/forge/Merge/UpdateMerge.js | 27 +++--------------------- src/forge/Order/New.js | 10 +++------ src/forge/Order/order.js | 4 +--- 7 files changed, 22 insertions(+), 65 deletions(-) diff --git a/public/js/editormd/editormd.min.js b/public/js/editormd/editormd.min.js index c60e4771..9117ac7b 100755 --- a/public/js/editormd/editormd.min.js +++ b/public/js/editormd/editormd.min.js @@ -4403,9 +4403,9 @@ window._whenPasterDoUpload = function (event, action, callback) { // 读取该图片 var file = item.getAsFile(); var oMyForm = new FormData(); - oMyForm.append("editormd-image-file", file); - oMyForm.append("file_param_name", "editormd-image-file"); - oMyForm.append("byxhr", "true"); + oMyForm.append("file", file); + // oMyForm.append("file_param_name", "editormd-image-file"); + // oMyForm.append("byxhr", "true"); var xhr = new window.XMLHttpRequest(); xhr.addEventListener("load", function (_xhr) { diff --git a/src/App.js b/src/App.js index 4ee19f56..dcc79471 100644 --- a/src/App.js +++ b/src/App.js @@ -782,7 +782,7 @@ class App extends Component { } /> () + (props) => () } /> diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 9a5abae3..ac980f32 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -86,7 +86,7 @@ export function getUrl(path, goTest) { // testbdweb.educoder.net testbdweb.trustie.net // const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000' // const local = 'https://testeduplus2.educoder.net' - const local = 'https://testforgeplus.trustie.net/' + const local = 'https://testforgeplus.trustie.net' if (isDev) { return `${local}${path?path:''}` } @@ -155,35 +155,28 @@ export function getmyUrl(geturl) { } export function getUploadActionUrl(path, goTest) { - // 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}`}`; + return `${getUrl()}/api/attachments.json?debug=${window._debugType || 'admin'}`; } export function getUploadLogoActionUrl() { - let anewopens=md5(newopens+newtimestamp); - return `${getUrl()}/api/resumes/logo.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`; + return `${getUrl()}/api/resumes/logo.json?debug=${window._debugType || 'admin'}`; } export function getUploadActionUrltwo(id) { - 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}`}` + return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json?debug=${window._debugType || 'admin'}` } export function getUploadActionUrlthree() { - 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}`}` + return `${getUrlmys()}/api/jupyters/import_with_tpm.json?debug=${window._debugType || 'admin'}` } export function getupload_git_file(id) { - let anewopens=md5(newopens+newtimestamp); - return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` + return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json?debug=${window._debugType || 'admin'}` } export function getUploadActionUrlOfAuth(id) { - 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}`}` + return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json?debug=${window._debugType || 'admin'}` } export function getRandomNumber(type) { @@ -205,15 +198,7 @@ export function getTaskUrlById(id) { } export function getRandomcode(url) { - Railsgettimes() - let anewopens=md5(newopens+newtimestamp); - - if (url.indexOf('?') == -1) { - return `${url}?randomcode=${newtimestamp}&client_key=${anewopens}` - }else { - return `${url}&randomcode=${newtimestamp}&client_key=${anewopens}` - } - + return url; } export function htmlEncode(str) { diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index d7fb9528..b3a7f467 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -1,7 +1,7 @@ import React , { Component } from 'react'; import {Menu, Spin} from 'antd'; import { getImageUrl , markdownToHTML } from 'educoder'; -import { Router , Route , Link } from 'react-router-dom'; +import { Link } from 'react-router-dom'; import Top from './DetailTop'; import './list.css'; @@ -10,11 +10,10 @@ import SelectBranch from '../Branch/SelectBranch'; import CloneAddress from '../Branch/CloneAddress'; import RootTable from './RootTable'; import CoderRootFileDetail from './CoderRootFileDetail'; -import NullData from './NullData'; import { truncateCommitId } from '../common/util'; +import RenderHtml from '../../components/render-html'; import axios from 'axios'; -import img_fork from "../Images/fork.png"; /** * address:http和SSH,http_url(对应git地址) * branch:当前分支 @@ -241,7 +240,7 @@ class CoderRootDirectory extends Component{
{ readMeContent[0].content ? -
+ : 暂无~ } diff --git a/src/forge/Merge/UpdateMerge.js b/src/forge/Merge/UpdateMerge.js index 27b83eb4..cedb5e07 100644 --- a/src/forge/Merge/UpdateMerge.js +++ b/src/forge/Merge/UpdateMerge.js @@ -7,7 +7,7 @@ import Nav from '../Order/Nav'; import UploadComponent from '../Upload/Index'; import { getImageUrl } from 'educoder'; import{ Modal , Form , Input , Select } from 'antd' -import QuillForEditor from '../quillForEditor'; +import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor'; import Attachments from '../Upload/attachment' @@ -195,9 +195,6 @@ class UpdateMerge extends Component{ const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments } = this.state; return(
- {/*
*/} - {/*
*/}
@@ -216,26 +213,8 @@ class UpdateMerge extends Component{ )} - {/* - {getFieldDecorator('body', { - rules: [], - initialValue: textcount - })( -