diff --git a/src/app/pipes/recharge-pay-type.pipe.ts b/src/app/pipes/recharge-pay-type.pipe.ts new file mode 100644 index 0000000..5e4778b --- /dev/null +++ b/src/app/pipes/recharge-pay-type.pipe.ts @@ -0,0 +1,19 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'rechargePayType' +}) +export class RechargePayTypePipe implements PipeTransform { + + + transform(value: number): string { + switch (value) { + case 1: + return '微信'; + case 2: + return '工会卡'; + case 3: + return '积分'; + } + } +}