Commit 417531e3 authored by caicaicai's avatar caicaicai

修改

parent 8d550eb9
...@@ -723,50 +723,50 @@ export default { ...@@ -723,50 +723,50 @@ export default {
// xhr.onreadystatechange=onreadystatechange("上传方式一【Base64】"); // xhr.onreadystatechange=onreadystatechange("上传方式一【Base64】");
// xhr.send(postData); // xhr.send(postData);
//发送语音数据 //发送语音数据
if (This.websocket.readyState === 1) { // that.websock.readyState = 1 表示连接成功,可以立即发送信息 if (This.websocket.readyState == 1) { // that.websock.readyState = 1 表示连接成功,可以立即发送信息
This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`); This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`);
//上传到数据库 //上传到数据库
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => { // HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
//近期通知列表 // //近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => { // HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
This.recentNoticeData = res.data.content; // This.recentNoticeData = res.data.content;
}; // };
}) // })
}else{ // }else{
this.$notify({ // this.$notify({
title: res.msg, // title: res.msg,
type: 'error', // type: 'error',
duration: 2500 // duration: 2500
}) // })
} // }
}).catch(function(error) { }); // }).catch(function(error) { });
This.$notify({ This.$notify({
title: '上传成功!', title: '上传成功!',
type: 'success', type: 'success',
duration: 2500 duration: 2500
}); });
} else if (This.websocket.readyState === 0) { // 表示正在连接,设置300ms后发送信息 } else if (This.websocket.readyState == 0) { // 表示正在连接,设置300ms后发送信息
setTimeout(function () { setTimeout(function () {
This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`); This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`);
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => { // HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
//近期通知列表 // //近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => { // HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
This.recentNoticeData = res.data.content; // This.recentNoticeData = res.data.content;
}; // };
}) // })
}else{ // }else{
this.$notify({ // this.$notify({
title: res.msg, // title: res.msg,
type: 'error', // type: 'error',
duration: 2500 // duration: 2500
}) // })
} // }
}).catch(function(error) { }); // }).catch(function(error) { });
This.$notify({ This.$notify({
title: '上传成功!', title: '上传成功!',
type: 'success', type: 'success',
...@@ -777,22 +777,22 @@ export default { ...@@ -777,22 +777,22 @@ export default {
This.initWebSocket(); This.initWebSocket();
setTimeout(function () { setTimeout(function () {
This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`); This.websocketsend(`{"toUserId":"${This.carAllNumberString}","contentText":"${postData}","fromUserId":"${This.dialogTitle1}"}`);
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => { // HttpReq.truckDispatching.recentNoticeAdd({noticeClass:This.dialogTitle1,flag:1,videoContent:postData}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
//近期通知列表 // //近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => { // HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => {
if(res.code == 200){ // if(res.code == 200){
This.recentNoticeData = res.data.content; // This.recentNoticeData = res.data.content;
}; // };
}) // })
}else{ // }else{
this.$notify({ // this.$notify({
title: res.msg, // title: res.msg,
type: 'error', // type: 'error',
duration: 2500 // duration: 2500
}) // })
} // }
}).catch(function(error) { }); // }).catch(function(error) { });
This.$notify({ This.$notify({
title: '上传成功!', title: '上传成功!',
type: 'success', type: 'success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment