修复查看帖子、评论、回复评论、点赞、收藏,添加用户等级
Change-Id: Ida9590d7ccee08dcd787a36c7e5cb39a3e26cd0d
diff --git a/src/pages/InterestGroup/InterestGroup.jsx b/src/pages/InterestGroup/InterestGroup.jsx
index eb9ed41..a68f20c 100644
--- a/src/pages/InterestGroup/InterestGroup.jsx
+++ b/src/pages/InterestGroup/InterestGroup.jsx
@@ -3,7 +3,7 @@
import './InterestGroup.css';
import Header from '../../components/Header'; // 导入 Header 组件
-const API_BASE = process.env.REACT_APP_API_BASE;
+
const InterestGroup = () => {
const [groups, setGroups] = useState([]);
@@ -23,7 +23,7 @@
try {
setLoading(true);
setError(null);
- const response = await axios.get(`${API_BASE}/echo/groups`, {
+ const response = await axios.get(`/echo/groups`, {
params: {
category,
name,
@@ -74,7 +74,7 @@
const userId = 1; // 假设用户ID为1,可以根据实际情况获取
try {
- const response = await axios.post(`${API_BASE}/echo/groups/${groupId}/join`, {
+ const response = await axios.post(`/echo/groups/${groupId}/join`, {
user_id: userId
});