浏览代码

added mockapiurl config

Skylsmoi 6 年前
父节点
当前提交
6cce254a69
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/container/Thread.jsx

+ 3 - 2
src/container/Thread.jsx 查看文件

@@ -24,7 +24,8 @@ const debug = {
24 24
     icon: 'fa fa-comments-o',
25 25
     color: '#65c7f2',
26 26
     domContainer: 'appContainer',
27
-    apiUrl: 'http://localhost:3001'
27
+    apiUrl: 'http://localhost:3001',
28
+    mockApiUrl: 'http://localhost:3001'
28 29
   },
29 30
   loggedUser: {
30 31
     id: 5,
@@ -78,7 +79,7 @@ class Thread extends React.Component {
78 79
     const { content, config } = this.state
79 80
     if (content.id === '-1') return // debug case
80 81
 
81
-    const fetchResultThread = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
82
+    const fetchResultThread = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
82 83
       ...FETCH_CONFIG,
83 84
       method: 'GET'
84 85
     })