From 118e42884e677a99dbdd20349eaad85c96bafeb4 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期四, 22 四月 2021 10:56:13 +0800
Subject: [PATCH] 优化拉流代理

---
 web_src/src/components/dialog/StreamProxyEdit.vue |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/web_src/src/components/dialog/StreamProxyEdit.vue b/web_src/src/components/dialog/StreamProxyEdit.vue
index d849ec6..66f63ad 100644
--- a/web_src/src/components/dialog/StreamProxyEdit.vue
+++ b/web_src/src/components/dialog/StreamProxyEdit.vue
@@ -151,22 +151,20 @@
         url:`/api/proxy/save`,
         data: 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();
-            }
+        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("鍏抽棴娣诲姞瑙嗛骞冲彴");

--
Gitblit v1.8.0