CatPtain commited on
Commit
33178be
·
verified ·
1 Parent(s): eeee843

Upload index.ts

Browse files
Files changed (1) hide show
  1. frontend/src/services/index.ts +3 -3
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 = '/data' // 修改为相对路径,使用本地资源
6
 
7
  export default {
8
  getMockData(filename: string): Promise<any> {
9
- return axios.get(`${ASSET_URL}/${filename}`)
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(