/**
 * 1:线下支付 2：微信支付 3 ：支付宝支付 4:京东支付 5:招行一网通支付 6:艾米币 7:专用豆 8通用豆
 */
export type PayType = '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';

const payTypeList = [
  { value: '1', name: '线下支付' },
  { value: '2', name: '微信支付' },
  { value: '3', name: '支付宝支付' },
  { value: '4', name: '京东支付' },
  { value: '5', name: '招行一网通支付' },
  { value: '6', name: '艾米币' },
  { value: '7', name: '专用豆' },
  { value: '8', name: '通用豆' },
  { value: '9', name: '系统计扣' },
];

export const getPayType = (type: string) => {
  let item = payTypeList.find(item => item.value === type);
  return item ? item.name : '';
};
