|
@@ -695,11 +695,22 @@ export default {
|
|
|
/** 新增 */
|
|
|
delete this.formmodel.id
|
|
|
this.formmodel.part_id = this.$store.getters.partId
|
|
|
+ //判断 janus 是否连接状态
|
|
|
+ if (this.janus === null) {
|
|
|
+ this.connect(this.rtcServer)
|
|
|
+ this.$message.error('重新连接,请再次点击保存')
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
API_Broadcast.add(this.formmodel).then(result => {
|
|
|
console.log(result)
|
|
|
if (result){
|
|
|
- this.createStreaming(result.id, result.audio_port);
|
|
|
+ if (result.id) {
|
|
|
+ this.createStreaming(result.id, result.audio_port);
|
|
|
+ } else {
|
|
|
+ this.$message.error('保存失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error(this.$t('action.fromError'))
|
|
|
return
|