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/DeviceList.vue |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/web_src/src/components/DeviceList.vue b/web_src/src/components/DeviceList.vue
index 8a3f1c0..cdc25bc 100644
--- a/web_src/src/components/DeviceList.vue
+++ b/web_src/src/components/DeviceList.vue
@@ -136,20 +136,20 @@
 			getDeviceList: function() {
 				let that = this;
 				this.getDeviceListLoading = true;
-				this.$axios.get(`/api/devices`,{
+				this.$axios({
+					method: 'get',
+					url:`/api/device/query/devices`,
 					params: {
 						page: that.currentPage,
 						count: that.count
 					}
-				} )
-				.then(function (res) {
+				}).then(function (res) {
 					console.log(res);
 					console.log(res.data.list);
 					that.total = res.data.total;
 					that.deviceList = res.data.list;
 					that.getDeviceListLoading = false;
-				})
-				.catch(function (error) {
+				}).catch(function (error) {
 					console.log(error);
 					that.getDeviceListLoading = false;
 				});
@@ -167,13 +167,12 @@
 			//gb28181骞冲彴瀵规帴
 			//鍒锋柊璁惧淇℃伅
 			refDevice: function(itemData) {
-				///api/devices/{deviceId}/sync
 				console.log("鍒锋柊瀵瑰簲璁惧:" + itemData.deviceId);
 				var that = this;
 				that.$refs[itemData.deviceId + 'refbtn' ].loading = true;
 				this.$axios({
 					method: 'post',
-					url: '/api/devices/' + itemData.deviceId + '/sync'
+					url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
 				}).then(function(res) {
 					console.log("鍒锋柊璁惧缁撴灉锛�"+JSON.stringify(res));
 					if (!res.data.deviceId) {
@@ -216,8 +215,8 @@
         console.log(`淇敼浼犺緭鏂瑰紡涓� ${row.streamMode}锛�${row.deviceId} `);
         let that = this;
         this.$axios({
-          method: 'get',
-          url: '/api/devices/' + row.deviceId + '/transport/' + row.streamMode
+          method: 'post',
+          url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode
         }).then(function(res) {
 
         }).catch(function(e) {

--
Gitblit v1.8.0