From a70e327a8efaf38d74911ea568419a087fbd235a Mon Sep 17 00:00:00 2001
From: lawrencehj <1934378145@qq.com>
Date: 星期四, 15 四月 2021 11:42:05 +0800
Subject: [PATCH] 修改用户密码前先验证旧密码,增加安全性

---
 web_src/src/components/dialog/StreamProxyEdit.vue |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/web_src/src/components/dialog/StreamProxyEdit.vue b/web_src/src/components/dialog/StreamProxyEdit.vue
index a2b3c9e..b0ea10e 100644
--- a/web_src/src/components/dialog/StreamProxyEdit.vue
+++ b/web_src/src/components/dialog/StreamProxyEdit.vue
@@ -21,7 +21,10 @@
                   <el-option label="FFmpeg" value="ffmpeg"></el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="搴旂敤鍚�" prop="app">
+              <el-form-item label="鍚嶇О" prop="name">
+                <el-input v-model="proxyParam.name" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="娴佸簲鐢ㄥ悕" prop="app">
                 <el-input v-model="proxyParam.app" clearable></el-input>
               </el-form-item>
               <el-form-item label="娴両D" prop="stream">
@@ -38,6 +41,9 @@
               </el-form-item>
               <el-form-item label="FFmpeg鍛戒护妯℃澘" prop="ffmpeg_cmd_key" v-if="proxyParam.type=='ffmpeg'">
                 <el-input v-model="proxyParam.ffmpeg_cmd_key" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="鍥芥爣缂栫爜" prop="gbId">
+                <el-input v-model="proxyParam.gbId" placeholder="璁剧疆鍥芥爣缂栫爜鍙帹閫佸埌鍥芥爣" clearable></el-input>
               </el-form-item>
               <el-form-item label="鎷夋祦鏂瑰紡" prop="rtp_type" v-if="proxyParam.type=='default'">
                 <el-select
@@ -100,6 +106,7 @@
       isLoging: false,
       onSubmit_text: "绔嬪嵆鍒涘缓",
       proxyParam: {
+          name: null,
           type: "default",
           app: null,
           stream: null,
@@ -107,6 +114,7 @@
           src_url: null,
           timeout_ms: null,
           ffmpeg_cmd_key: null,
+          gbId: null,
           rtp_type: null,
           enable: true,
           enable_hls: true,
@@ -114,6 +122,7 @@
       },
       
       rules: {
+        name: [{ required: true, message: "璇疯緭鍏ュ悕绉�", trigger: "blur" }],
         app: [{ required: true, message: "璇疯緭鍏ュ簲鐢ㄥ悕", trigger: "blur" }],
         stream: [{ required: true, message: "璇疯緭鍏ユ祦ID", trigger: "blur" }],
         url: [{ required: true, message: "璇疯緭鍏ヨ浠g悊鐨勬祦", trigger: "blur" }],
@@ -137,9 +146,11 @@
     onSubmit: function () {
       console.log("onSubmit");
       var that = this;
-      that.$axios
-        .post(`/api/proxy/save`, that.proxyParam)
-        .then(function (res) {
+      that.$axios({
+        method: 'post',
+        url:`/api/proxy/save`, 
+        data: that.proxyParam
+      }).then(function (res) {
           console.log(res);
           console.log(res.data == "success");
           if (res.data == "success") {
@@ -153,8 +164,7 @@
               that.listChangeCallback();
             }
           }
-        })
-        .catch(function (error) {
+        }).catch(function (error) {
           console.log(error);
         });
     },
@@ -166,14 +176,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