- 乘积最大序列
+ 乘积最大序列 {hasUpdate}
{/* to={`/problems/${_hack_id}/edit`} */}
@@ -129,8 +128,9 @@ function StudentStudy (props) {
const mapStateToProps = (state) => {
const { userInfo } = state.userReducer;
- const { hack_identifier, user_program_identifier } = state.ojForUserReducer;
+ const { hack_identifier, user_program_identifier, hack } = state.ojForUserReducer;
return {
+ hack,
userInfo,
user_program_identifier,
hack_identifier
diff --git a/public/react/src/services/ojService.js b/public/react/src/services/ojService.js
index 9700f7031..e13b66397 100644
--- a/public/react/src/services/ojService.js
+++ b/public/react/src/services/ojService.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:55:38
* @LastEditors: tangjiang
- * @LastEditTime: 2019-12-13 10:09:12
+ * @LastEditTime: 2019-12-13 17:03:47
*/
import axios from 'axios';
@@ -84,10 +84,10 @@ export async function fetchUserCommitRecordDetail (identifier) {
}
// 恢复初始代码
-export async function restoreInitialCode (identifier) {
- const url = `/myproblems/${identifier}/restore_initial_code.json`;
- return axios.get(url);
-}
+// export async function restoreInitialCode (identifier) {
+// const url = `/myproblems/${identifier}/restore_initial_code.json`;
+// return axios.get(url);
+// }
// 发布任务
export async function publishTask (identifier) {
@@ -115,7 +115,8 @@ export async function fetchUserCodeSubmit (identifier) {
// 恢复初始代码
export async function fetchRestoreInitialCode (identifier) {
- const url = `/myproblems/${identifier}/restore_initial_code.json`;
+ // const url = `/myproblems/${identifier}/restore_initial_code.json`;
+ const url = `/myproblems/${identifier}/sync_code.json`;
return axios.post(url);
}
From 42d4207f05ab3991b8e77008153f59a4a7b0fd37 Mon Sep 17 00:00:00 2001
From: tangjiang <465264938@qq.com>
Date: Fri, 13 Dec 2019 17:42:00 +0800
Subject: [PATCH 10/10] update style
---
.../modules/developer/components/controlSetting/index.js | 4 ++--
.../modules/developer/components/controlSetting/index.scss | 4 +++-
.../src/modules/developer/components/initTabCtx/index.js | 3 ++-
.../src/modules/developer/components/initTabCtx/index.scss | 7 +++++++
.../modules/developer/components/myMonacoEditor/index.scss | 4 +++-
5 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/developer/components/controlSetting/index.js b/public/react/src/modules/developer/components/controlSetting/index.js
index 690bbad36..587e1bee9 100644
--- a/public/react/src/modules/developer/components/controlSetting/index.js
+++ b/public/react/src/modules/developer/components/controlSetting/index.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 16:02:36
* @LastEditors: tangjiang
- * @LastEditTime: 2019-12-10 09:30:27
+ * @LastEditTime: 2019-12-13 17:32:33
*/
import './index.scss';
import React, { useState, useRef } from 'react';
@@ -84,7 +84,7 @@ const ControlSetting = (props) => {
diff --git a/public/react/src/modules/developer/components/controlSetting/index.scss b/public/react/src/modules/developer/components/controlSetting/index.scss
index 4a2c221c1..97838ce5c 100644
--- a/public/react/src/modules/developer/components/controlSetting/index.scss
+++ b/public/react/src/modules/developer/components/controlSetting/index.scss
@@ -2,6 +2,7 @@
position: absolute;
bottom: 0;
width: 100%;
+ background:rgba(30,30,30,1);
// height: 56px;
.control_tab{
position: absolute;
@@ -51,7 +52,8 @@
height: 56px;
padding-right: 30px;
padding-left: 10px;
- background: #000;
+ // background: #000;
+ background:rgba(48,48,48,1);
}
.setting_drawer{
diff --git a/public/react/src/modules/developer/components/initTabCtx/index.js b/public/react/src/modules/developer/components/initTabCtx/index.js
index 19f4230b1..3834a3e11 100644
--- a/public/react/src/modules/developer/components/initTabCtx/index.js
+++ b/public/react/src/modules/developer/components/initTabCtx/index.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 19:46:14
* @LastEditors: tangjiang
- * @LastEditTime: 2019-12-10 09:31:00
+ * @LastEditTime: 2019-12-13 17:38:42
*/
import './index.scss';
import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
@@ -50,6 +50,7 @@ function InitTabCtx (props, ref) {
],
initialValue: inputValue
})()
diff --git a/public/react/src/modules/developer/components/initTabCtx/index.scss b/public/react/src/modules/developer/components/initTabCtx/index.scss
index dc2d07d63..449db1d2a 100644
--- a/public/react/src/modules/developer/components/initTabCtx/index.scss
+++ b/public/react/src/modules/developer/components/initTabCtx/index.scss
@@ -47,4 +47,11 @@
.flex_r{
padding: 0 20px 0 10px;
}
+
+ .input_textarea_style{
+ background:rgba(30,30,30,1) !important;
+ color: #fff;
+ border-color: transparent;
+ outline: none;
+ }
}
diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.scss b/public/react/src/modules/developer/components/myMonacoEditor/index.scss
index bad3d1081..7a7c4f030 100644
--- a/public/react/src/modules/developer/components/myMonacoEditor/index.scss
+++ b/public/react/src/modules/developer/components/myMonacoEditor/index.scss
@@ -1,11 +1,13 @@
.monaco_editor_area{
height: 100%;
+ background-color: rgba(30,30,30,1);
.code_title{
display: flex;
align-items: center;
// justify-content: space-between;
// background: #000;
- background: #333333;
+ // background: #333333;
+ background-color: rgba(48,48,48,1);
color: #fff;
height: 56px;
padding: 0 30px;