diff --git a/src/views/index.vue b/src/views/index.vue index c523aa4..4dc6920 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -100,14 +100,15 @@
-
+
体育场 当前人数 - 4,738 - 40% + + {{ item.allEnter }} + {{ item.proportion }}
-
+
@@ -164,7 +165,8 @@ export default { week_num: 0, mon_num: 0, year_num: 0, - klqsDatas: [] + klqsDatas: [], + ssjgNumDatas: [] }; }, //创建的时候修改背景图片 @@ -848,8 +850,22 @@ export default { console.log(that); homeApi.allInfoDatas().then(res => { // get allTimeData - const tmpdata = res.data.returnData - console.log(tmpdata); + this.ssjgNumDatas = res.data.returnData + // let ssjgNumDatas = this.ssjgNumDatas + // ssjgNumDatas.forEach(item => { + // console.log(parseInt(item.proportion)); + // let proportion = parseInt(item.proportion) + // if (proportion >= 80 && proportion <= 90) { + // console.log('11111111'); + // this.$refs.proportionbox.addClass('rbrate2') + // } + // if (proportion > 90) { + // console.log('222222'); + // // console.log(this.$refs.proportionbox) + // this.$refs.proportionbox.addClass('rbrate3') + // } + // }) + // console.log(tmpdata); // console.log(tmpdata.01.proportion); // let arr = JSON.stringify(tmpdata) // console.log(arr);