Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
bad6a312
Commit
bad6a312
authored
Aug 09, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cn去掉/upload/factory
parent
30d52ef5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
src/api/axios.ts
+7
-0
src/components/NavMenu.vue
+2
-2
No files found.
src/api/axios.ts
View file @
bad6a312
...
...
@@ -60,6 +60,12 @@ export function getFilePath() {
import
.
meta
.
env
.
VITE_API_BASE_URL
+
import
.
meta
.
env
.
VITE_API_BASE_UPLOAD_URL
)
}
export
function
getFileCnPath
()
{
if
(
!
/
(
http|https
)
:
\/\/([^/]
+
)
/i
.
test
(
import
.
meta
.
env
.
BASE_URL
))
{
return
location
.
origin
}
return
import
.
meta
.
env
.
VITE_API_BASE_URL
}
export
function
getWsUrl
()
{
if
(
location
.
protocol
===
'https:'
)
{
return
'wss://'
+
location
.
host
...
...
@@ -68,5 +74,6 @@ export function getWsUrl() {
}
}
export
const
filePath
=
getFilePath
()
export
const
FileCnPath
=
getFileCnPath
()
export
default
axios
src/components/NavMenu.vue
View file @
bad6a312
...
...
@@ -244,7 +244,7 @@ import type { FormRules } from 'element-plus'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
changePasswordApi
}
from
'@/api/auth'
import
{
getLogisticUSApi
,
getLogisticCNApi
}
from
'@/api/common'
import
{
filePath
}
from
'@/api/axios'
import
{
filePath
,
FileCnPath
}
from
'@/api/axios'
import
{
ElMessage
}
from
'element-plus'
interface
MenuItem
{
index
:
string
...
...
@@ -530,7 +530,7 @@ const getLogistic = () => {
// 中国物流
getLogisticCNApi
(
content
.
value
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
window
.
open
(
file
Path
+
res
.
data
.
documentUrl
,
'_blank'
)
window
.
open
(
FileCn
Path
+
res
.
data
.
documentUrl
,
'_blank'
)
}
})
}
else
{
...
...
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