Upload index.ts
Browse files
frontend/src/services/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import axios from './config'
|
|
| 2 |
|
| 3 |
// export const SERVER_URL = 'http://localhost:5000'
|
| 4 |
export const SERVER_URL = (import.meta.env.MODE === 'development') ? '/api' : '/api'
|
| 5 |
-
export const ASSET_URL = '
|
| 6 |
|
| 7 |
export default {
|
| 8 |
getMockData(filename: string): Promise<any> {
|
|
@@ -10,7 +10,7 @@ export default {
|
|
| 10 |
},
|
| 11 |
|
| 12 |
getFileData(filename: string): Promise<any> {
|
| 13 |
-
return axios.get(`${ASSET_URL}
|
| 14 |
},
|
| 15 |
|
| 16 |
AIPPT_Outline(
|
|
|
|
| 2 |
|
| 3 |
// export const SERVER_URL = 'http://localhost:5000'
|
| 4 |
export const SERVER_URL = (import.meta.env.MODE === 'development') ? '/api' : '/api'
|
| 5 |
+
export const ASSET_URL = '/data' // 修改为本地路径
|
| 6 |
|
| 7 |
export default {
|
| 8 |
getMockData(filename: string): Promise<any> {
|
|
|
|
| 10 |
},
|
| 11 |
|
| 12 |
getFileData(filename: string): Promise<any> {
|
| 13 |
+
return axios.get(`${ASSET_URL}/${filename}.json`)
|
| 14 |
},
|
| 15 |
|
| 16 |
AIPPT_Outline(
|