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.
|
|
|
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 + '龙阅,';
|
|
|
|
}
|
|
|
|
if (Number(i) === 3) {
|
|
|
|
string = string + '城宇,';
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return string.substring(0 , string.length - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|