Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
6980fdac
Commit
6980fdac
authored
May 12, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 22051】 chore: 修改相关链接 防止跨域
parent
90448c83
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
index.ts
src/api/common/index.ts
+1
-1
index.vue
src/views/publishVideo/index.vue
+9
-3
No files found.
src/api/common/index.ts
View file @
6980fdac
...
@@ -5,7 +5,7 @@ import { storeToRefs } from 'pinia'
...
@@ -5,7 +5,7 @@ import { storeToRefs } from 'pinia'
import
type
{
UploadFileResponseItem
,
ChunkCheckResponse
}
from
'./types'
import
type
{
UploadFileResponseItem
,
ChunkCheckResponse
}
from
'./types'
// 'https://oa.yswg.com.cn:8085'
// 'https://oa.yswg.com.cn:8085'
const
OA_UPLOAD_CHUNK_BASE_URL
=
'https://nas1.yswg.top:8088'
export
const
OA_UPLOAD_CHUNK_BASE_URL
=
'https://nas1.yswg.top:8088'
const
OA_UPLOAD_COMMON_BASE_URL
=
'http://47.112.96.71:8082'
const
OA_UPLOAD_COMMON_BASE_URL
=
'http://47.112.96.71:8082'
const
CHUNK_UPLOAD_THRESHOLD
=
10
*
1024
*
1024
const
CHUNK_UPLOAD_THRESHOLD
=
10
*
1024
*
1024
const
CHUNK_SIZE
=
5
*
1024
*
1024
const
CHUNK_SIZE
=
5
*
1024
*
1024
...
...
src/views/publishVideo/index.vue
View file @
6980fdac
...
@@ -385,7 +385,7 @@
...
@@ -385,7 +385,7 @@
import
UploadVideo
from
'@/components/common/UploadVideo/index.vue'
import
UploadVideo
from
'@/components/common/UploadVideo/index.vue'
import
{
useResetData
}
from
'@/hooks'
import
{
useResetData
}
from
'@/hooks'
import
{
ArticleTypeEnum
,
ReleaseStatusTypeEnum
,
SendTypeEnum
,
BooleanFlag
}
from
'@/constants'
import
{
ArticleTypeEnum
,
ReleaseStatusTypeEnum
,
SendTypeEnum
,
BooleanFlag
}
from
'@/constants'
import
{
addOrUpdateArticle
,
uploadFile
,
getArticleDetail
}
from
'@/api'
import
{
addOrUpdateArticle
,
uploadFile
,
getArticleDetail
,
OA_UPLOAD_CHUNK_BASE_URL
}
from
'@/api'
import
SelectTags
from
'@/components/common/SelectTags/index.vue'
import
SelectTags
from
'@/components/common/SelectTags/index.vue'
import
type
{
TagItemDto
,
AddOrUpdateVideoDto
}
from
'@/api'
import
type
{
TagItemDto
,
AddOrUpdateVideoDto
}
from
'@/api'
import
{
useVideoStore
,
useUserStore
}
from
'@/stores'
import
{
useVideoStore
,
useUserStore
}
from
'@/stores'
...
@@ -634,7 +634,7 @@ const handleVideoChange = ({
...
@@ -634,7 +634,7 @@ const handleVideoChange = ({
url
:
string
url
:
string
videoDuration
:
string
videoDuration
:
string
})
=>
{
})
=>
{
locationVideoBlolUrl
.
value
=
form
.
value
.
videoUrl
locationVideoBlolUrl
.
value
=
parseUrl
(
form
.
value
.
videoUrl
)
form
.
value
.
videoDuration
=
videoDuration
form
.
value
.
videoDuration
=
videoDuration
}
}
...
@@ -647,6 +647,12 @@ const handleFileChange = async (e: Event) => {
...
@@ -647,6 +647,12 @@ const handleFileChange = async (e: Event) => {
const
data
=
await
promise
const
data
=
await
promise
form
.
value
.
faceUrl
=
data
.
filePath
form
.
value
.
faceUrl
=
data
.
filePath
}
}
// 防止跨域
const
parseUrl
=
(
url
:
string
)
=>
{
return
OA_UPLOAD_CHUNK_BASE_URL
+
'/oa/nfs'
+
new
URL
(
url
).
pathname
.
replace
(
'/database'
,
''
)
}
onDeactivated
(()
=>
{
onDeactivated
(()
=>
{
// 清空页面的数据
// 清空页面的数据
resetPageData
()
resetPageData
()
...
@@ -658,7 +664,7 @@ onActivated(async () => {
...
@@ -658,7 +664,7 @@ onActivated(async () => {
if
(
route
.
query
.
id
)
{
if
(
route
.
query
.
id
)
{
const
{
data
}
=
await
getArticleDetail
(
route
.
query
.
id
as
string
)
const
{
data
}
=
await
getArticleDetail
(
route
.
query
.
id
as
string
)
locationVideoBlolUrl
.
value
=
data
.
videoUrl
locationVideoBlolUrl
.
value
=
parseUrl
(
data
.
videoUrl
)
form
.
value
=
{
form
.
value
=
{
...
form
.
value
,
...
form
.
value
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment