Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NewTruckTerminalSyetem
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
SQL_Mou
NewTruckTerminalSyetem
Commits
f284f885
Commit
f284f885
authored
May 11, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c0730dc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
27 deletions
+25
-27
config.js
src/config.js
+4
-4
index.vue
src/views/MLargeScreen/components/voiceApplication/index.vue
+3
-5
index.vue
src/views/MLargeScreen/index.vue
+2
-2
vue.config.js
vue.config.js
+16
-16
No files found.
src/config.js
View file @
f284f885
// 项目配置相关
const
config
=
{
BASE_URL
:
'
http://8.143.203.103:9090
'
,
//线上地址2
REAL_URL
:
'
http://8.143.203.103:9090
'
,
//线上地址2
//
BASE_URL: 'http://8.143.203.103:9090', //线上地址2
//
REAL_URL: 'http://8.143.203.103:9090', //线上地址2
// BASE_URL: 'http://192.168.0.110
:8001',
// REAL_URL: 'http://192.168.0.110
:8001',
BASE_URL
:
'
http://192.168.0.108
:8001
'
,
REAL_URL
:
'
http://192.168.0.108
:8001
'
,
TOKEN_KEY
:
'
token
'
,
USER_KEY
:
'
userInfo
'
,
...
...
src/views/MLargeScreen/components/voiceApplication/index.vue
View file @
f284f885
...
...
@@ -496,23 +496,21 @@ export default {
postData
+=
"
mime=
"
+
encodeURIComponent
(
blob
.
type
);
//告诉后端,这个录音是什么格式的,可能前后端都固定的mp3可以不用写
postData
+=
"
&upfile_b64=
"
+
encodeURIComponent
((
/.+;
\s
*base64
\s
*,
\s
*
(
.+
)
$/i
.
exec
(
reader
.
result
)
||
[])[
1
])
//录音文件内容,后端进行base64解码成二进制
//...其他表单参数
// var xhr=new XMLHttpRequest();
// xhr.open("POST", api);
// xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
// xhr.onreadystatechange=onreadystatechange("上传方式一【Base64】");
// xhr.send(postData);
//发送语音数据
if
(
This
.
websocket
.
readyState
===
1
)
{
// that.websock.readyState = 1 表示连接成功,可以立即发送信息
//console.log(`{"toUserId":"${This.userName1}","contentText":"${postData}"}`);
if
(
This
.
websocket
.
readyState
==
1
)
{
// that.websock.readyState = 1 表示连接成功,可以立即发送信息
This
.
websocketsend
(
`{"toUserId":"
${
This
.
carAllNumberString
}
","contentText":"
${
postData
}
","fromUserId":"
${
This
.
userName1
}
"}`
);
This
.
$notify
({
title
:
'
上传成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
else
if
(
This
.
websocket
.
readyState
===
0
)
{
// 表示正在连接,设置300ms后发送信息
}
else
if
(
This
.
websocket
.
readyState
==
0
)
{
// 表示正在连接,设置300ms后发送信息
setTimeout
(
function
()
{
This
.
websocketsend
(
`{"toUserId":"
${
This
.
carAllNumberString
}
","contentText":"
${
postData
}
","fromUserId":"
${
This
.
userName1
}
"}`
);
This
.
$notify
({
...
...
src/views/MLargeScreen/index.vue
View file @
f284f885
...
...
@@ -146,9 +146,9 @@ export default {
res1
.
data
.
forEach
((
item
,
index
)
=>
{
this
.
notifyPromise
=
this
.
notifyPromise
.
then
(
this
.
$nextTick
).
then
(()
=>
{
this
.
$notify
({
title
:
(
item
.
type
==
1
?
"
闯入
"
:
item
.
type
==
2
?
'
闯出
'
:
''
)
+
item
.
areaName
,
title
:
(
item
.
type
==
1
?
"
限入
"
:
item
.
type
==
2
?
'
限出
'
:
item
.
type
==
3
?
'
无故停车
'
:
item
.
type
==
4
?
'
防碰撞
'
:
''
)
+
(
item
.
areaName
==
undefined
?
''
:
item
.
areaName
)
+
'
报警
'
,
type
:
'
warning
'
,
duration
:
8
000
,
duration
:
10
000
,
dangerouslyUseHTMLString
:
true
,
});
});
...
...
vue.config.js
View file @
f284f885
...
...
@@ -17,30 +17,30 @@ module.exports = {
open
:
true
,
// 配置自动启动浏览器
proxy
:
{
'
/dianziweilan
'
:
{
target
:
'
http://8.143.203.103:9090
'
},
'
/auth
'
:
{
target
:
'
http://8.143.203.103:9090
'
,
},
'
/pic
'
:
{
target
:
'
http://8.143.203.103/avatar/
'
,
pathRewrite
:
{
'
^/pic
'
:
''
},
changeOrigin
:
true
,
},
// '/dianziweilan': {
// target: 'http://
192.168.0.110:8001
'
// target: 'http://
8.143.203.103:9090
'
// },
// '/auth': {
// target: 'http://
192.168.0.110:8001
',
// target: 'http://
8.143.203.103:9090
',
// },
// '/pic': {
// target: 'http://
192.168.0.110
/avatar/',
// target: 'http://
8.143.203.103
/avatar/',
// pathRewrite: { '^/pic': '' },
// changeOrigin: true,
// },
'
/dianziweilan
'
:
{
target
:
'
http://192.168.0.108:8001
'
},
'
/auth
'
:
{
target
:
'
http://192.168.0.108:8001
'
,
},
'
/pic
'
:
{
target
:
'
http://192.168.0.108/avatar/
'
,
pathRewrite
:
{
'
^/pic
'
:
''
},
changeOrigin
:
true
,
},
},
//https: true,
...
...
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