From 4596eac8957826b7b47a044a13d6daa8b8457fe7 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Wed, 14 Oct 2020 16:43:55 +0800 Subject: [PATCH] Change ForumSection Watch APi --- src/AppConfig.js | 4 ++-- src/forums/Component/Top.jsx | 2 +- src/user_info/Memo/SectionItem.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 69d3cc31..8e921d9f 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -58,8 +58,8 @@ export function initAxiosInterceptors(props) { initOnlineOfflineListener() // TODO 避免重复的请求 https://github.com/axios/axios#cancellation var - // proxy = "http://localhost:3000" - proxy = "https://testforgeplus.trustie.net" + proxy = "http://localhost:3000" + // proxy = "https://testforgeplus.trustie.net" const requestMap = {}; window.setfalseInRequestMap = function (keyName) { diff --git a/src/forums/Component/Top.jsx b/src/forums/Component/Top.jsx index a9627895..afea6440 100644 --- a/src/forums/Component/Top.jsx +++ b/src/forums/Component/Top.jsx @@ -65,7 +65,7 @@ export default ({ headData, title , operation , history }) => { // 收藏、取消收藏 function saveForum(id){ if(id){ - const url = `/memos/forum_memos/${id}/is_watch.json`; + const url = `/forum_memos/${id}/is_watch.json`; axios.post(url,{ is_watch:watched?0:1 }).then(result=>{ diff --git a/src/user_info/Memo/SectionItem.js b/src/user_info/Memo/SectionItem.js index 315d4722..6cf4e44c 100644 --- a/src/user_info/Memo/SectionItem.js +++ b/src/user_info/Memo/SectionItem.js @@ -16,7 +16,7 @@ function section_item({ forum_section, key }) { function handleClick(){ setIsLoading(true); - let url = `/v1/memos/forum_memos/${forum_section.id}/is_watch.json`; + let url = `/forum_memos/${forum_section.id}/is_watch.json`; axios.post(url, { is_watch: isStar ? 0 : 1 })