浏览代码

added mockapiurl config

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

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

@@ -25,7 +25,7 @@ const debug = {
25 25
     icon: 'fa fa-file-text-o',
26 26
     color: '#fdfdfd',
27 27
     domContainer: 'appContainer',
28
-    apiUrl: 'http://localhost:3001'
28
+    mockApiUrl: 'http://localhost:3001'
29 29
   },
30 30
   loggedUser: {
31 31
     id: 5,
@@ -82,11 +82,11 @@ class pageHtml extends React.Component {
82 82
     const { content, config } = this.state
83 83
     if (content.id === '-1') return // debug case
84 84
 
85
-    const fetchResultPageHtml = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
85
+    const fetchResultPageHtml = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
86 86
       ...FETCH_CONFIG,
87 87
       method: 'GET'
88 88
     })
89
-    const fetchResultTimeline = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}/timeline`, {
89
+    const fetchResultTimeline = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}/timeline`, {
90 90
       ...FETCH_CONFIG,
91 91
       method: 'GET'
92 92
     })