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(() => { })