Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI推理平台
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lichunliang
AI推理平台
Commits
a9038b00
Commit
a9038b00
authored
Feb 24, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 山西华远跳转 token接收
parent
e4d8f181
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
325 additions
and
9 deletions
+325
-9
.env
.env
+1
-1
dist.zip
dist.zip
+0
-0
route.ts
src/router/guard/route.ts
+6
-0
shared.ts
src/service/request/shared.ts
+12
-2
index.vue
src/views/AlgorithmConfiguration/index.vue
+3
-3
vite.config.ts
vite.config.ts
+3
-3
vite.config.ts.timestamp-1740122963479-f65ffad1dbb92.mjs
vite.config.ts.timestamp-1740122963479-f65ffad1dbb92.mjs
+300
-0
No files found.
.env
View file @
a9038b00
...
...
@@ -74,7 +74,7 @@ VITE_STORAGE_PREFIX=SOY_
# ============================================ old
# 开发环境 - 视频流地址
VITE_VIDEO_URL=ws://192.168.2.1
6
:9999
VITE_VIDEO_URL=ws://192.168.2.1
8
:9999
# 开发环境 - 所有服务接口地址
VITE_SERVICE_URL=http://192.168.2.16:9998
...
...
dist.zip
0 → 100644
View file @
a9038b00
File added
src/router/guard/route.ts
View file @
a9038b00
...
...
@@ -41,6 +41,12 @@ export function createRouteGuard(router: Router) {
// 是否存在 TOKEN 登录 与否
const
AdminToken
=
new
URLSearchParams
(
window
.
location
.
search
).
get
(
'
Admin
'
)
if
(
AdminToken
){
localStg
.
set
(
'
token
'
,
AdminToken
);
localStg
.
set
(
'
refreshToken
'
,
AdminToken
);
}
const
isLogin
=
Boolean
(
localStg
.
get
(
'
token
'
));
// 留存过期前信息
...
...
src/service/request/shared.ts
View file @
a9038b00
...
...
@@ -15,9 +15,19 @@ export async function handleRefreshToken(axiosConfig: AxiosRequestConfig) {
const
refreshToken
=
localStg
.
get
(
'
refreshToken
'
)
||
''
;
const
{
error
,
data
}
=
await
fetchRefreshToken
(
refreshToken
);
const
AdminToken
=
new
URLSearchParams
(
window
.
location
.
search
).
get
(
'
Admin
'
)
alert
(
'
adminToken
'
)
if
(
!
error
)
{
localStg
.
set
(
'
token
'
,
data
.
token
);
localStg
.
set
(
'
refreshToken
'
,
data
.
refreshToken
);
if
(
AdminToken
){
localStg
.
set
(
'
token
'
,
AdminToken
);
localStg
.
set
(
'
refreshToken
'
,
AdminToken
);
}
else
{
localStg
.
set
(
'
token
'
,
data
.
token
);
localStg
.
set
(
'
refreshToken
'
,
data
.
refreshToken
);
}
const
config
=
{
...
axiosConfig
};
if
(
config
.
headers
)
{
...
...
src/views/AlgorithmConfiguration/index.vue
View file @
a9038b00
...
...
@@ -477,9 +477,9 @@ const submitCallback = async () => {
return
message
.
error
(
'
摄像头分组必选!
'
);
}
if
(
!
preview
)
{
return
message
.
error
(
'
请选择摄像头预览图片!
'
);
}
//
if (!preview) {
//
return message.error('请选择摄像头预览图片!');
//
}
if
(
isEdit
.
value
)
{
await
api_addCameras
(
formWebCam
.
value
).
then
(
async
res
=>
{
...
...
vite.config.ts
View file @
a9038b00
...
...
@@ -4,7 +4,7 @@ import { defineConfig, loadEnv } from 'vite';
import
{
setupVitePlugins
}
from
'
./build/plugins
'
;
import
{
createViteProxy
,
getBuildTime
}
from
'
./build/config
'
;
// export const proxyTarget = 'http://192.168.2.16:999
6
';
// export const proxyTarget = 'http://192.168.2.16:999
8
';
// export const proxyTarget = 'http://192.168.2.16:9998';
export
const
proxyTarget
=
'
http://192.168.2.16:9998
'
;
...
...
@@ -13,13 +13,13 @@ export const proxyTarget = 'http://192.168.2.16:9998';
// 视频地址
export
const
videdUrl
=
'
ws://192.168.2.1
6
:9999
'
;
export
const
videdUrl
=
'
ws://192.168.2.1
8
:9999
'
;
// 固定接口地址
export
const
apiUrl
=
'
http://192.168.2.16:9998
'
;
// WS 地址
export
const
wsUrl
=
'
ws://192.168.2.1
6
:9999
'
;
export
const
wsUrl
=
'
ws://192.168.2.1
8
:9999
'
;
export
default
defineConfig
(
configEnv
=>
{
...
...
vite.config.ts.timestamp-1740122963479-f65ffad1dbb92.mjs
0 → 100644
View file @
a9038b00
This diff is collapsed.
Click to expand it.
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