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