diff --git a/.env.production b/.env.production index f728ee2..0a20fe4 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ NODE_ENV = 'production' VITE_APP_TITLE = '教学一体化平台' -VITE_APP_BASE_API = '/api' \ No newline at end of file +# VITE_APP_BASE_API = '/api' \ No newline at end of file diff --git a/.env.test b/.env.test index b11cdda..4e97960 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,4 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'test' VITE_APP_TITLE = '教学一体化平台' -VITE_APP_BASE_API = '/api' \ No newline at end of file +# VITE_APP_BASE_API = '/api' \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 624b859..79bb8fa 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,6 +1,7 @@ // @see https://eslint.bootcss.com/docs/rules/ module.exports = { + publicPath:"/portal", env: { browser: true, es2021: true, diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..1cfa891 Binary files /dev/null and b/dist.zip differ diff --git a/package.json b/package.json index 855f00d..1e7798a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --open", - "build:test": "vue-tsc && vite build --mode test", + "build:test": "vite build", "build:pro": "vue-tsc && vite build --mode production", "preview": "vite preview", "lint": "eslint src", diff --git a/src/api/course.ts b/src/api/course.ts index a1b7708..9535b52 100644 --- a/src/api/course.ts +++ b/src/api/course.ts @@ -11,7 +11,7 @@ export const getCourseList = (params: object) => { // 获取课程图谱 export const getCourseAtlas = (params: object) => { return request({ - url: '/knowNeo/getAllKnowByCourseId', + url: '/api/knowNeo/getAllKnowByCourseId', params, }) } @@ -23,7 +23,7 @@ export const getCourseAtlas = (params: object) => { // } export const getCourseChapter = (params: any) => { return request({ - url: '/chapter2/chapter', + url: '/api/chapter2/chapter', params, }) } @@ -31,14 +31,14 @@ export const getCourseChapter = (params: any) => { // 获取所有课程资源 export const getCourseFiles = (params:any) => { return request({ - url:'/resource/queryByCourseId', + url:'/api/resource/queryByCourseId', params }) } // 获取文件流 export const getFileStreams = (params:any) => { return request({ - url:'/resource/read', + url:'/api/resource/read', params }) } \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index f4dacbc..5c3aecf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,6 +20,7 @@ const px2remOptions = { minPixelValue: 0 , //设置要替换的最小像素值(3px会被转rem)。 默认 0 } export default defineConfig({ + base:'/portal', plugins: [ vue(), // 配置svg插件