嗨森逛PC管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-web/src/app/pipes/recharge-price/recharge-platform.pipe.ts

24 lines
558 B

import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name: 'rechargePlatform'
})
export class RechargePlatformPipe implements PipeTransform {
transform(value: string): unknown {
const array = value.split('-');
let string = '';
for (const i of array) {
if (Number(i) === 1) {
string = string + '尖椒,';
}
if (Number(i) === 2) {
string = string + '龙阅,';
}
}
return string.substring(0 , string.length - 1);
}
}