Upload index.ts
Browse files
frontend/src/services/index.ts
CHANGED
@@ -2,15 +2,15 @@ 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> {
|
9 |
-
return axios.get(
|
10 |
},
|
11 |
|
12 |
getFileData(filename: string): Promise<any> {
|
13 |
-
return axios.get(`${ASSET_URL}/${filename}`)
|
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 = 'https://asset.pptist.cn'
|
6 |
|
7 |
export default {
|
8 |
getMockData(filename: string): Promise<any> {
|
9 |
+
return axios.get(`./mocks/${filename}.json`)
|
10 |
},
|
11 |
|
12 |
getFileData(filename: string): Promise<any> {
|
13 |
+
return axios.get(`${ASSET_URL}/data/${filename}.json`)
|
14 |
},
|
15 |
|
16 |
AIPPT_Outline(
|