diff --git a/src/exchange/Manage/PreCreate.js b/src/exchange/Manage/PreCreate.js
index ec133f974..888e521a5 100644
--- a/src/exchange/Manage/PreCreate.js
+++ b/src/exchange/Manage/PreCreate.js
@@ -24,10 +24,11 @@ class PreCreate extends Component {
// subId存在就是编辑否则就是新增
const { refresh , subId } = this.props;
const { plateId } = this.props.match.params;
- const url = `/forum_sections/${plateId}${subId ? "/rename":""}.json`;
+ const url = `/forum_sections${subId ? "/rename":""}.json`;
axios.post(url,{
title:values.title,
- children_section_id:subId
+ children_section_id:subId,
+ id: plateId
}).then((result)=>{
if(result){
refresh();
diff --git a/src/exchange/Manage/PrePlateManage.js b/src/exchange/Manage/PrePlateManage.js
index 0bfbe443a..1acb25094 100644
--- a/src/exchange/Manage/PrePlateManage.js
+++ b/src/exchange/Manage/PrePlateManage.js
@@ -96,9 +96,10 @@ class PrePlateManage extends Component {
content: '确认删除二级板块?',
onOk: () => {
const { plateId } = this.props.match.params;
- const url=`/forum_sections/${plateId}/destroy.json`
+ const url=`/forum_sections/destroy_forum.json`
axios.post(url,{
- children_section_id:id
+ children_section_id:id,
+ id: plateId
}).then(result=>{
if(result){
this.props.showNotification(result.data.message);
diff --git a/src/user_info/Index.jsx b/src/user_info/Index.jsx
index c4ffa2468..24e4c9bdc 100644
--- a/src/user_info/Index.jsx
+++ b/src/user_info/Index.jsx
@@ -2,7 +2,7 @@ import React from "react";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
-import { Route, Switch } from "react-router-dom";
+import { Route, Switch, Redirect } from "react-router-dom";
import Loading from "../Loading";
import Loadable from "react-loadable";
import UserInfo from "./User/Account";
@@ -10,10 +10,10 @@ import { MainContent, MinH400 } from "./css/projects";
import '../forums/css/All.scss';
import '../forums/css/Index.css';
-const Projects = Loadable({
- loader: () => import("./User/Projects"),
- loading: Loading,
-});
+// const Projects = Loadable({
+// loader: () => import("./User/Projects"),
+// loading: Loading,
+// });
const Memos = Loadable({
loader: () => import("./Memo/Memos"),
@@ -36,49 +36,50 @@ function Index(props) {
-
- }
- >
- }
- >
- }
- >
- }
- >
- }
- >
- }
- >
-
+ }
+ >
+ }
+ >
+ }
+ >
+ }
+ >
+ }
+ >
+ {/* }
>
}
- >
+ > */}
- }
- >
-
+ > */}
+ }
+ >
+
+
-
+
-
+
);
}
export default CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)));
diff --git a/src/user_info/Memo/Memos.js b/src/user_info/Memo/Memos.js
index 7e04731b8..c569e5308 100644
--- a/src/user_info/Memo/Memos.js
+++ b/src/user_info/Memo/Memos.js
@@ -31,7 +31,7 @@ function memos(props) {
async function init() {
setSpinType(true);
- let url = `/v1/my_memos/${user_login}/memos.json`;
+ let url = `/my_memos/${user_login}/memos.json`;
axios.get(url, {
params: {
...common_select,
diff --git a/src/user_info/Memo/Sections.js b/src/user_info/Memo/Sections.js
index 9a9b70e59..cd9bbd8dc 100644
--- a/src/user_info/Memo/Sections.js
+++ b/src/user_info/Memo/Sections.js
@@ -13,7 +13,7 @@ function sections(props) {
useEffect(() => {
async function init() {
setSpinType(true);
- let url = `/v1/my_memos/${user_login}/my_interested.json`;
+ let url = `/my_memos/${user_login}/my_interested.json`;
axios
.get(url, {
params: {
diff --git a/src/user_info/Memo/SelectTitle.js b/src/user_info/Memo/SelectTitle.js
index 35c8675ef..e261e0b81 100644
--- a/src/user_info/Memo/SelectTitle.js
+++ b/src/user_info/Memo/SelectTitle.js
@@ -23,7 +23,7 @@ function select_title({section_params, select_memos}) {
useEffect(() => {
async function init() {
setLoadingType(true);
- let url = `/v1/forum_sections/select_sections.json`;
+ let url = `/forum_sections/select_sections.json`;
axios
.get(url)
.then((result) => {
diff --git a/src/user_info/User/Account.js b/src/user_info/User/Account.js
index 4c163186c..0ea3b0531 100644
--- a/src/user_info/User/Account.js
+++ b/src/user_info/User/Account.js
@@ -12,7 +12,7 @@ function account(props) {
useEffect(() => {
async function init(login) {
setSpin(true);
- let url = `/v1/users/${login}/user_info.json`;
+ let url = `/users/${login}/user_info.json`;
axios
.get(url)
.then((result) => {
diff --git a/src/user_info/User/BlockUsers.js b/src/user_info/User/BlockUsers.js
index 3516e2a82..46e83385b 100644
--- a/src/user_info/User/BlockUsers.js
+++ b/src/user_info/User/BlockUsers.js
@@ -14,7 +14,7 @@ function block_users(props) {
useEffect(() => {
async function init() {
setSpinType(true);
- let url = `/v1/users/${user_login}/block_user_lists.json`;
+ let url = `/users/${user_login}/block_user_lists.json`;
axios
.get(url, {
params: {
diff --git a/src/user_info/User/Menu.js b/src/user_info/User/Menu.js
index 1f7a01805..52769d7d3 100644
--- a/src/user_info/User/Menu.js
+++ b/src/user_info/User/Menu.js
@@ -3,7 +3,7 @@ import { Menu } from "antd";
import "./menu.scss";
function user_menu({ is_current_user, login, props }) {
- const [defaultMenu, setDefaultMenu] = useState("p_project");
+ const [defaultMenu, setDefaultMenu] = useState("memos");
const handleClick = (e) => {
setDefaultMenu(e.key);
props.history.push(`/accounts/${login}/${e.key}`);
@@ -14,7 +14,7 @@ function user_menu({ is_current_user, login, props }) {
if (location_path.length > 3 && current_path) {
setDefaultMenu(current_path);
} else {
- setDefaultMenu("p_project");
+ setDefaultMenu("memos");
}
}, [props.location]);
const show_name = is_current_user ? "我" : "TA";
@@ -25,8 +25,8 @@ function user_menu({ is_current_user, login, props }) {
selectedKeys={defaultMenu}
mode="horizontal"
>
-
{show_name}管理的
- {show_name}参与的
+ {/* {show_name}管理的
+ {show_name}参与的 */}
{show_name}的帖子
{show_name}的回帖
{is_current_user && (
diff --git a/src/user_info/User/Projects.js b/src/user_info/User/Projects.js
index 52d61f413..5646eb0a0 100644
--- a/src/user_info/User/Projects.js
+++ b/src/user_info/User/Projects.js
@@ -28,7 +28,7 @@ function user_projects(props) {
useEffect(() => {
async function init() {
setSpinType(true);
- let url = `/v1/users/${user_login}/user_projects.json`;
+ let url = `/users/${user_login}/user_projects.json`;
axios
.get(url, {
params: { page, type, p, order, limit },
diff --git a/src/user_info/User/StarUser.js b/src/user_info/User/StarUser.js
index ddf3b6dea..accce4c8c 100644
--- a/src/user_info/User/StarUser.js
+++ b/src/user_info/User/StarUser.js
@@ -33,7 +33,7 @@ function star_user({
const to_star = (star_type) => {
if(current_login){
setLoadinStatus(true);
- let url = `/v1/users/${login}/watch_user.json`;
+ let url = `/users/${login}/watch_user.json`;
if (is_blocked_by) {
setModalStatus(true)
setLoadinStatus(false);
@@ -73,7 +73,7 @@ function star_user({
const to_block = (block_type) => {
setModalStatus(false);
setBlockLoadingStatus(true);
- let url = `/v1/users/${login}/block_user.json`;
+ let url = `/users/${login}/block_user.json`;
axios
.post(url, { block: block_type })
.then((result) => {
diff --git a/src/user_info/User/UserBrief.js b/src/user_info/User/UserBrief.js
index a33e7b05c..b7f3b0c7d 100644
--- a/src/user_info/User/UserBrief.js
+++ b/src/user_info/User/UserBrief.js
@@ -12,7 +12,7 @@ function user_brief({ brief, login, is_current_user }) {
};
const edit_brief = () => {
setLoadingStatus(true);
- let url = `/v1/users/${login}/edit_brief.json`;
+ let url = `/users/${login}/edit_brief.json`;
axios
.post(url, { content: editBrief })
.then((result) => {