提交代理商订单页面

pull/1/head
袁野 2 years ago
parent bf3f32e154
commit ce3ea6a5f7
  1. 17
      src/app/pipes/apiMerchant/verify-product-type.pipe.ts
  2. 34
      src/app/pipes/order/order-product-type.pipe.ts

@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'verifyProductType'
})
export class VerifyProductTypePipe implements PipeTransform {
transform(value: string[]): unknown {
if (value != null) {
return value.includes('6');
} else {
return null;
}
}
}

@ -0,0 +1,34 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'orderProductType'
})
export class OrderProductTypePipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 1:
return '星巴克';
case 2:
return '肯德基';
case 3:
return '会员充值';
case 4:
return '积分充值';
case 5:
return '购买卡券';
case 6:
return '加油服务';
case 7:
return '优惠券包';
case 8:
return '汇联通充值';
case 9:
return '话费充值';
case 99:
return '商户充值';
default:
return '未知';
}
}
}
Loading…
Cancel
Save