From cb5849d8a14f55241c44bdf6724b18de7950564d Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期三, 14 四月 2021 16:33:10 +0800 Subject: [PATCH] 支持接口鉴权,支持修改密码, --- web_src/src/components/channelList.vue | 70 +++++++++++++++++----------------- 1 files changed, 35 insertions(+), 35 deletions(-) diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index b06ce25..89fe0ae 100644 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -153,17 +153,17 @@ }, getDeviceChannelList: function () { let that = this; - - this.$axios.get(`/api/devices/${this.$route.params.deviceId}/channels`, { - params: { - page: that.currentPage, + this.$axios({ + method: 'get', + url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`, + params:{ + page: that.currentPage, count: that.count, query: that.searchSrt, online: that.online, channelType: that.channelType - } - }) - .then(function (res) { + } + }).then(function (res) { console.log(res); that.total = res.data.total; that.deviceChannelList = res.data.list; @@ -171,10 +171,10 @@ that.$nextTick(() => { that.$refs.channelListTable.doLayout(); }) - }) - .catch(function (error) { - console.log(error); - }); + }).catch(function (error) { + console.log(error); + }); + }, @@ -188,7 +188,7 @@ let that = this; this.$axios({ method: 'get', - url: '/api/play/' + deviceId + '/' + channelId + url: '/api/play/start/' + deviceId + '/' + channelId }).then(function (res) { console.log(res.data) let streamId = res.data.streamId; @@ -215,8 +215,8 @@ console.log(itemData) var that = this; this.$axios({ - method: 'post', - url: '/api/play/' + itemData.streamId + '/stop' + method: 'get', + url: '/api/play/stop/' + itemData.streamId }).then(function (res) { console.log(JSON.stringify(res)); that.initData(); @@ -224,7 +224,7 @@ if (error.response.status == 402) { // 宸茬粡鍋滄杩� that.initData(); }else { - console.log(e) + console.log(error) } }); }, @@ -251,26 +251,26 @@ showSubchannels: function (channelId) { let that = this; - this.$axios.get(`/api/subChannels/${this.deviceId}/${this.parentChannelId}/channels`, { - params: { - page: that.currentPage, - count: that.count, - query: that.searchSrt, - online: that.online, - channelType: that.channelType - } + this.$axios({ + method: 'get', + url:`/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, + params: { + page: that.currentPage, + count: that.count, + query: that.searchSrt, + online: that.online, + channelType: that.channelType + } + }).then(function (res) { + that.total = res.data.total; + that.deviceChannelList = res.data.list; + // 闃叉鍑虹幇琛ㄦ牸閿欎綅 + that.$nextTick(() => { + that.$refs.channelListTable.doLayout(); }) - .then(function (res) { - that.total = res.data.total; - that.deviceChannelList = res.data.list; - // 闃叉鍑虹幇琛ㄦ牸閿欎綅 - that.$nextTick(() => { - that.$refs.channelListTable.doLayout(); - }) - }) - .catch(function (error) { - console.log(error); - }); + }).catch(function (error) { + console.log(error); + }); }, search: function () { console.log(this.searchSrt) @@ -282,7 +282,7 @@ console.log(row) this.$axios({ method: 'post', - url: `/api/channel/update/${this.deviceId}`, + url: `/api/device/query/channel/update/${this.deviceId}`, params: row }).then(function (res) { console.log(JSON.stringify(res)); -- Gitblit v1.8.0