From 3f0dfc65e32b7243b8494f93c90845a38094d41b Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Wed, 1 Jun 2022 17:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=87=AA=E5=BB=BA=E7=AB=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=B0=E8=AF=9D=E8=B4=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pipes/chlid-recharge-status.pipe.ts | 21 +++++++++++++++++++ src/app/pipes/pay-status.pipe.ts | 23 +++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/app/pipes/chlid-recharge-status.pipe.ts create mode 100644 src/app/pipes/pay-status.pipe.ts diff --git a/src/app/pipes/chlid-recharge-status.pipe.ts b/src/app/pipes/chlid-recharge-status.pipe.ts new file mode 100644 index 0000000..b43a75a --- /dev/null +++ b/src/app/pipes/chlid-recharge-status.pipe.ts @@ -0,0 +1,21 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'chlidRechargeStatus' +}) +export class ChlidRechargeStatusPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 101: + return '充值成功'; + case 102: + return '充值中'; + case 103: + return '充值失败'; + case 104: + return '未充值'; + } + } + +} diff --git a/src/app/pipes/pay-status.pipe.ts b/src/app/pipes/pay-status.pipe.ts new file mode 100644 index 0000000..15edb4b --- /dev/null +++ b/src/app/pipes/pay-status.pipe.ts @@ -0,0 +1,23 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'payStatus' +}) +export class PayStatusPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 101: + return '待支付'; + case 102: + return '已支付'; + case 100: + return '已完成'; + case 104: + return '已取消'; + case 105: + return '已退款'; + } + } + +}