From 7afb38b831467e717ca980db7c954a87fa46f774 Mon Sep 17 00:00:00 2001 From: clz Date: Fri, 9 Sep 2022 14:18:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=F0=9F=9B=A0=EF=B8=8F:=20=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build.ps1 | 2 +- src/store/index.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 98bb0ce..9ae9476 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -4,5 +4,5 @@ docker push registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-react:dev ssh aliyun "cd /root/docker/bill-sys/; docker compose down; - docker pull registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-go:dev; + docker pull registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-react:dev; docker compose up -d" diff --git a/src/store/index.ts b/src/store/index.ts index 98b0b9e..872c48b 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -80,7 +80,14 @@ export class Bill { } getTotalMoney(type?: BillType) { - return !type ? this.totalMoney : type === BillType.income ? this.incomeMoney : this.consumeMoney + switch (type) { + case BillType.income: + return this.incomeMoney + case BillType.consume: + return this.consumeMoney + default: + return this.totalMoney + } } get meanMoneyByDate() {