From c0670ab32f52a88a2014e6d6b168931ff1a01bf6 Mon Sep 17 00:00:00 2001 From: pixcai Date: Thu, 3 May 2018 14:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E5=AD=97=E9=99=A4?= =?UTF-8?q?=E9=9B=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue-gopub/src/pages/home/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vue-gopub/src/pages/home/index.vue b/vue-gopub/src/pages/home/index.vue index e5c9a3d..e581f80 100644 --- a/vue-gopub/src/pages/home/index.vue +++ b/vue-gopub/src/pages/home/index.vue @@ -149,7 +149,10 @@ this.totalmem=data.totalmen; this.totalproject=data.totalproject; this.totalpub=data.totalpub; - this.totalpubsuccess=(data.totalpubsuccess/data.totalpub).toFixed(2) *100 + this.totalpubsuccess = data.totalpubsuccess; + if (data.totalpub) { + this.totalpubsuccess=(this.totalpubsuccess/data.totalpub).toFixed(2)*100; + } this.hostsum=data.hostsum; }).catch(() => { })