This commit is contained in:
Qi 2025-08-20 15:51:24 +08:00
parent 7e1e542a6c
commit 171eb28566
6 changed files with 23 additions and 7 deletions

2
components.d.ts vendored
View File

@ -26,9 +26,7 @@ declare module 'vue' {
ElTabs: typeof import('element-plus/es')['ElTabs']
Footer: typeof import('./src/components/Footer.vue')['default']
Header: typeof import('./src/components/Header.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
VideoPlayer: typeof import('./src/components/VideoPlayer.vue')['default']
}
}

View File

@ -2,7 +2,7 @@ import axios from 'axios'
// 创建axios实例
const api = axios.create({
baseURL: 'http://localhost:8080/jeecg-boot', // 后端API地址
baseURL: 'http://43.138.83.20:10002/jeecg-boot', // 后端API地址
timeout: 10000,
headers: {
'Content-Type': 'application/json'

View File

@ -375,6 +375,24 @@ const getRandomColor = () => {
return colors[Math.floor(Math.random() * colors.length)]
}
// 访URL
const getFileAccessHttpUrl = (path: string) => {
if (!path) return ''
// HTTP URLblob URL
if (path.startsWith('http://') || path.startsWith('https://') || path.startsWith('blob:')) {
return path
}
// URL
if (path.startsWith('/')) {
return `http://43.138.83.20:10002/jeecg-boot/sys/common/static${path}`
}
//
return `http://43.138.83.20:10002/jeecg-boot/sys/common/static/${path}`
}
//
const openMediaGallery = (type: string) => {
currentMediaType.value = type

View File

@ -1022,7 +1022,7 @@ const getFileAccessHttpUrl = (filePath: string) => {
}
// 访
const baseUrl = 'http://localhost:8080/jeecg-boot/sys/common/static/'
const baseUrl = 'http://43.138.83.20:10002/jeecg-boot/sys/common/static/'
//
let cleanPath = filePath.startsWith('/') ? filePath.substring(1) : filePath

View File

@ -586,7 +586,7 @@ const getFileAccessHttpUrl = (filePath: string) => {
}
// 访
const baseUrl = 'http://localhost:8080/jeecg-boot/sys/common/static/'
const baseUrl = 'http://43.138.83.20:10002/jeecg-boot/sys/common/static/'
//
let cleanPath = filePath.startsWith('/') ? filePath.substring(1) : filePath

View File

@ -317,11 +317,11 @@ const getFileAccessHttpUrl = (path: string) => {
// URL
if (path.startsWith('/')) {
return `http://localhost:8080/jeecg-boot/sys/common/static${path}`
return `http://43.138.83.20:10002/jeecg-boot/sys/common/static${path}`
}
//
return `http://localhost:8080/jeecg-boot/sys/common/static/${path}`
return `http://43.138.83.20:10002/jeecg-boot/sys/common/static/${path}`
}
//