Browse Source

更新请求

master
luyisha 3 years ago
parent
commit
3df1e50123
  1. 22
      src/App.vue
  2. 8
      src/views/ty/index.vue

22
src/App.vue

@ -64,7 +64,6 @@ export default {
mounted() { mounted() {
this.getTimespan(); this.getTimespan();
this.getStat(); this.getStat();
// this.getWS()
}, },
watch: { watch: {
timeCount: { timeCount: {
@ -121,27 +120,6 @@ export default {
} }
}); });
}, },
getWS(){
// ip127.0.0.1
let ws = new WebSocket("ws://10.97.121.2/ws");
ws.onopen = function() {
alert("连接成功");
let aa = {
type: 'allGroupTimeNum',
request: {
granularity: 'daily',
groupsId: ''
}
};
ws.send(JSON.stringify(aa));
alert("给服务端发送一个字符串:tom");
};
ws.onmessage = function(e) {
console.log(JSON.parse(e.data));
alert("收到服务端的消息:" + e.data);
};
console.log(11111)
},
autoChange(){ autoChange(){
if(this.currentPage==0){ if(this.currentPage==0){
this.currentPage = 1; this.currentPage = 1;

8
src/views/ty/index.vue

@ -773,7 +773,7 @@ export default {
idArr += "|"+item.groupId; idArr += "|"+item.groupId;
} }
}) })
homeApi.getAllfFlow({groupsId:idArr}).then(res=>{ homeApi.getAllfFlow({type:1}).then(res=>{
if(!res.data){ if(!res.data){
return; return;
} }
@ -803,7 +803,7 @@ export default {
// that.groupsData = []; // that.groupsData = [];
// //
homeApi.allTygGroupTimeNum({groupsId:idArr, granularity:'daily'}).then(res=>{ homeApi.allTygGroupTimeNum({type:1, granularity:'daily'}).then(res=>{
if(!res.data){ if(!res.data){
return; return;
} }
@ -848,7 +848,7 @@ export default {
} }
}) })
homeApi.allGroupNum({granularity:"daily",groupsId:groups}).then(res=>{ homeApi.allGroupNum({granularity:"daily",type:1}).then(res=>{
if(!res.data){ if(!res.data){
return; return;
} }
@ -878,7 +878,7 @@ export default {
} }
}) })
// //
homeApi.allGcgNumDatas({groupsId:idArr}).then(res=>{ homeApi.allGcgNumDatas({type:1}).then(res=>{
// console.log(res, '====='); // console.log(res, '=====');
if(!res.data){ if(!res.data){
return; return;

Loading…
Cancel
Save