Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
海康威视
web-project
Commits
5f6468c7
Commit
5f6468c7
authored
Jan 13, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉了外部接口
parent
32bc95a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
23 deletions
+18
-23
config.js
public/config.js
+0
-3
index.js
src/store/index.js
+5
-5
request.js
src/utils/request.js
+0
-2
vite.config.js
vite.config.js
+13
-13
No files found.
public/config.js
View file @
5f6468c7
// export const ExternalSERVEICE='http://218.69.97.198:8001'
// export const WithinSERVEICE='http://192.168.1.252:8001'
// export const ExternalSERVEICE='http://192.168.10.241:5013'
// export const WithinSERVEICE='http://192.168.10.241:5013'
...
...
@@ -14,7 +13,5 @@ export const AIAPIWithinSERVEICE='http://106.3.97.198:20050'
// export const ExternalSERVEICE='http://localhost:5013'
// export const WithinSERVEICE='http://localhost:5013'
export
const
ExternalSERVEICE
=
'http://218.69.97.198:8001'
export
const
WithinSERVEICE
=
'http://218.69.97.198:8001'
export
const
CURRLOGO
=
"LOGO_gangyi.png"
src/store/index.js
View file @
5f6468c7
...
...
@@ -2,7 +2,7 @@
import
{
createStore
}
from
'vuex'
import
{
orgFn
}
from
'@/api/org'
import
{
homeGetOrg
}
from
'../dataJson/common/common.js'
import
{
AIAPIExternalSERVEICE
,
AIAPIWithinSERVEICE
,
ExternalSERVEICE
,
WithinSERVEICE
}
from
'../../public/config'
import
{
AIAPIExternalSERVEICE
,
AIAPIWithinSERVEICE
}
from
'../../public/config'
const
keys
=
{
USER
:
'user'
,
ENTERPRISE
:
'enterprise'
,
SERVEICE
:
'SERVEICE'
,
AIAPISERVEICE
:
'AIAPISERVEICE'
}
function
getUserInfo
(
state
)
{
...
...
@@ -28,7 +28,7 @@ function getSERVEICE(state){
if
(
ip
)
{
state
.
SERVEICE
=
ip
;
}
else
{
state
.
SERVEICE
=
WithinSERVEICE
;
//
state.SERVEICE = WithinSERVEICE;
}
return
state
.
SERVEICE
;
}
...
...
@@ -61,11 +61,11 @@ const store = createStore({
},
mutations
:
{
setSERVEICE
(
state
,
ip
){
if
(
ip
===
"111.160.132.74"
||
ip
===
"218.69.97.198"
){
state
.
SERVEICE
=
WithinSERVEICE
;
if
(
ip
===
"111.160.132.74"
){
//
state.SERVEICE = WithinSERVEICE;
state
.
AIAPISERVEICE
=
AIAPIWithinSERVEICE
;
}
else
{
state
.
SERVEICE
=
ExternalSERVEICE
;
//
state.SERVEICE = ExternalSERVEICE;
state
.
AIAPISERVEICE
=
AIAPIExternalSERVEICE
;
}
...
...
src/utils/request.js
View file @
5f6468c7
const
port
=
'8001'
;
//export const SERVEICE='http://218.69.97.198:8001'
//'http://218.69.97.198:8001'
//export const TEST_SERVEICE='http://192.168.1.2:5013/'
export
const
SERVEICE
=
'http://192.168.1.2:5013/'
vite.config.js
View file @
5f6468c7
...
...
@@ -25,19 +25,19 @@ export default defineConfig({
port
:
5013
,
open
:
true
,
proxy
:
{
'/api'
:
{
// target: 'http://192.168.1.252:8001/',
target
:
'http://218.69.97.198:8001/'
,
// 目标服务器地址
// target: 'http://localhost:5013/', // 目标服务器地址
changeOrigin
:
true
,
// 允许跨域
},
'/AIapi'
:
{
target
:
'http://106.3.97.198:20050/'
,
//target: 'http://192.168.0.9:8099/', // 目标服务器地址
//target: 'http://localhost:5013/', // 目标服务器地址
changeOrigin
:
true
,
// 允许跨域
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
AIapi/
,
''
),
//路径重写,把'/ddapi'替换为''
}
//
'/api': {
//
// target: 'http://192.168.1.252:8001/',
//
target: 'http://218.69.97.198:8001/', // 目标服务器地址
//
// target: 'http://localhost:5013/', // 目标服务器地址
//
changeOrigin: true, // 允许跨域
//
},
//
'/AIapi': {
//
target: 'http://106.3.97.198:20050/',
//
//target: 'http://192.168.0.9:8099/', // 目标服务器地址
//
//target: 'http://localhost:5013/', // 目标服务器地址
//
changeOrigin: true, // 允许跨域
//
rewrite: (path) => path.replace(/^\/AIapi/, ''), //路径重写,把'/ddapi'替换为''
//
}
}
}
})
...
...
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