Commit bd2e8193 authored by xxx's avatar xxx

修改语音调用方法

parent 0df07e46
...@@ -157,7 +157,6 @@ export default { ...@@ -157,7 +157,6 @@ export default {
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName; this.equipmentName = resSon1.data.content[0].equipmentName;
this.paidanFlag = res.data.content[0].flag;
this.btnShow3 = true; this.btnShow3 = true;
this.btnShow4 = true; this.btnShow4 = true;
if(resSon1.data.content[0].workStatus == 0 && this.paidanFlag == 0){ if(resSon1.data.content[0].workStatus == 0 && this.paidanFlag == 0){
...@@ -222,7 +221,6 @@ export default { ...@@ -222,7 +221,6 @@ export default {
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName; this.equipmentName = resSon1.data.content[0].equipmentName;
this.paidanFlag = res.data.content[0].flag;
this.btnShow3 = true; this.btnShow3 = true;
this.btnShow4 = true; this.btnShow4 = true;
if(resSon1.data.content[0].workStatus == 0 && this.paidanFlag == 0){ if(resSon1.data.content[0].workStatus == 0 && this.paidanFlag == 0){
......
...@@ -37,9 +37,10 @@ ...@@ -37,9 +37,10 @@
</div> </div>
</div> </div>
<div style="display: flex;justify-content: space-around;"> <div style="display: flex;justify-content: space-around;">
<el-button type="primary" round class="toCallStyle tonghuaBtnShow" @click="recStart()" :disabled='tonghuadisabled'>{{tonghua1}}</el-button> <!-- <el-button type="primary" round class="toCallStyle tonghuaBtnShow" @click="recStart()" :disabled='tonghuadisabled'>{{tonghua1}}</el-button>
<el-button type="primary" round class="toCallStyle tonghuaBtnShow" @click="recStop()">结束通话</el-button> <el-button type="primary" round class="toCallStyle tonghuaBtnShow" @click="recStop()">结束通话</el-button>
<el-button type="primary" round class="toCallStyle" @click="recUploadLast()" :disabled='tonghuadisabled'>上传通话</el-button> <el-button type="primary" round class="toCallStyle" @click="recUploadLast()" :disabled='tonghuadisabled'>上传通话</el-button> -->
<el-button type="primary" round class="toCallStyle" @touchstart.native="recStart()" @touchend.native="recStop()">发起通话</el-button>
</div> </div>
</div> </div>
...@@ -416,20 +417,23 @@ export default { ...@@ -416,20 +417,23 @@ export default {
}); });
return; return;
} }
var This=this; var This=this;
var rec=This.rec; var rec=This.rec;
rec.stop(function(blob,duration){ rec.stop(function(blob,duration){
This.reclog("已录制:","",{ if(duration <= 1000){
blob:blob, This.$notify({
duration:duration, title: '按键时间太短',
rec:rec type: 'warning',
}); duration: 2500
This.$notify({ });
title: '已录制!', }else{
type: 'success', This.reclog("已录制:","",{
duration: 2500 blob:blob,
}); duration:duration,
rec:rec
});
This.recUploadLast();
}
},function(s){ },function(s){
This.$notify({ This.$notify({
title: '录音失败,'+s, title: '录音失败,'+s,
......
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