From f03605da8514c822fc98f2a98a0242d2cc1a311a Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Fri, 28 Jul 2023 16:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=91=BD=E5=90=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home.js | 6 ++--- src/views/HomeView.vue | 21 ++-------------- src/views/TycView.vue | 54 +++++++++++++++++++++++++++++++----------- 3 files changed, 45 insertions(+), 36 deletions(-) diff --git a/src/api/home.js b/src/api/home.js index 05fa27a..46f20c2 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -24,7 +24,7 @@ export function homeBarData(param) { param, }) } - +// ge export function allGroupNum(param) { return request({ url: '/pass.passcc/allGroupNum', @@ -41,10 +41,10 @@ export function allInfoDatas(param) { }) } // 今日各场馆的趋势 -export function allGcgNumDatas(param) { +export function tdGroupRealTimeEnter(param) { return request({ url: '/pass.passcc/toDayGroupsEnterNum', - method: 'post', + method: 'get', param, }) } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index b94318c..cae8b2b 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -673,28 +673,11 @@ export default { // 获取实时数据 getInfoDatas() { // interface - homeApi.allGcgNumDatas().then(res=>{ + homeApi.tdGroupRealTimeEnter().then(res=>{ this.ssjgNumDatas = res.data.returnData }) }, - // 待删除 - TPgetsckdata_tcp(){ - // websocket - const param ={ - type:'realTimeData', - } - const ws = new WebSocket("ws://10.97.121.2/ws"); - ws.onopen = function() { - ws.send(JSON.stringify(param)) - }; - ws.onmessage = (e)=>{ - var jstr = JSON.parse(e.data) - const darr = jstr.data; - this.ssjgNumDatas = darr.data - }; - }, - // udp getsckdata(){ // websocket @@ -712,7 +695,7 @@ export default { // 各个场馆的人流 getGcgNumDatas() { - homeApi.allGcgNumDatas().then(res => { + homeApi.tdGroupRealTimeEnter().then(res => { // get allTimeData const tmpdata = res.data.data // X 轴的名称字段 diff --git a/src/views/TycView.vue b/src/views/TycView.vue index 3b279a8..bab4d17 100644 --- a/src/views/TycView.vue +++ b/src/views/TycView.vue @@ -13,17 +13,17 @@
- {{ tdnum }} + {{ tdnum }} 今日进馆人数
- {{ tmdata }} + {{ tmdata }} 本月进馆人数
- {{ tydata }} + {{ tydata }} 本年进馆人数
@@ -272,7 +272,7 @@