From ef742e715b8c0a983d661aa5b5f8980dade8c790 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期四, 22 四月 2021 15:28:40 +0800
Subject: [PATCH] 优化宕机后点播中设备发送bye
---
web_src/src/components/dialog/StreamProxyEdit.vue | 61 +++++++++++++++---------------
1 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/web_src/src/components/dialog/StreamProxyEdit.vue b/web_src/src/components/dialog/StreamProxyEdit.vue
index 63a7bf6..66f63ad 100644
--- a/web_src/src/components/dialog/StreamProxyEdit.vue
+++ b/web_src/src/components/dialog/StreamProxyEdit.vue
@@ -62,14 +62,14 @@
<el-checkbox label="杞琀LS" v-model="proxyParam.enable_hls" ></el-checkbox>
<el-checkbox label="MP4褰曞埗" v-model="proxyParam.enable_mp4" ></el-checkbox>
</div>
-
+
</el-form-item>
<el-form-item>
<div style="float: right;">
<el-button type="primary" @click="onSubmit">{{onSubmit_text}}</el-button>
<el-button @click="close">鍙栨秷</el-button>
</div>
-
+
</el-form-item>
</el-form>
</div>
@@ -110,7 +110,7 @@
type: "default",
app: null,
stream: null,
- url: "rtmp://58.200.131.2:1935/livetv/hunantv",
+ url: "rtmp://58.200.131.2/livetv/cctv5hd",
src_url: null,
timeout_ms: null,
ffmpeg_cmd_key: null,
@@ -120,7 +120,7 @@
enable_hls: true,
enable_mp4: false,
},
-
+
rules: {
name: [{ required: true, message: "璇疯緭鍏ュ悕绉�", trigger: "blur" }],
app: [{ required: true, message: "璇疯緭鍏ュ簲鐢ㄥ悕", trigger: "blur" }],
@@ -146,26 +146,25 @@
onSubmit: function () {
console.log("onSubmit");
var that = this;
- that.$axios
- .post(`/api/proxy/save`, that.proxyParam)
- .then(function (res) {
- console.log(res);
- console.log(res.data == "success");
- if (res.data == "success") {
- that.$message({
- showClose: true,
- message: "淇濆瓨鎴愬姛",
- type: "success",
- });
- that.showDialog = false;
- if (that.listChangeCallback != null) {
- that.listChangeCallback();
- }
+ that.$axios({
+ method: 'post',
+ url:`/api/proxy/save`,
+ data: that.proxyParam
+ }).then(function (res) {
+ if (typeof (res.data.code) != "undefined" && res.data.code === 0) {
+ that.$message({
+ showClose: true,
+ message: res.data.msg,
+ type: "success",
+ });
+ that.showDialog = false;
+ if (that.listChangeCallback != null) {
+ that.listChangeCallback();
}
- })
- .catch(function (error) {
- console.log(error);
- });
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
},
close: function () {
console.log("鍏抽棴娣诲姞瑙嗛骞冲彴");
@@ -175,14 +174,14 @@
deviceGBIdExit: async function (deviceGbId) {
var result = false;
var that = this;
- await that.$axios
- .post(`/api/platforms/exit/${deviceGbId}`)
- .then(function (res) {
- result = res.data;
- })
- .catch(function (error) {
- console.log(error);
- });
+ await that.$axios({
+ method: 'post',
+ url:`/api/platform/exit/${deviceGbId}`
+ }).then(function (res) {
+ result = res.data;
+ }).catch(function (error) {
+ console.log(error);
+ });
return result;
},
checkExpires: function() {
--
Gitblit v1.8.0