module.exports = {
  getIconUrl: function (item, pay_type) {
    console.log(pay_type);
    var icon_url = "";
    if (item.status == 0 && pay_type == 2) {
      icon_url = "default";
      return icon_url;
    } else {
      switch (item.bank_name) {
        case "中国工商银行":
          icon_url = "gongshang";
          break;
        case "中国银行":
          icon_url = "zhongguo";
          break;
        case "中信银行":
          icon_url = "zhongxin";
          break;
        case "上海银行":
          icon_url = "shanghai";
          break;
        case "中国建设银行":
          icon_url = "jianshe";
          break;
        case "光大银行":
          icon_url = "guangda";
          break;
        case "民生银行":
          icon_url = "mingsheng";
          break;
        case "北京银行":
          icon_url = "beijing";
          break;
        case "平安银行":
          icon_url = "pingan";
          break;
        case "交通银行":
          icon_url = "jiaotong";
          break;
        case "招商银行":
          icon_url = "zhaoshang";
          break;
        case "广发银行":
          icon_url = "guangfa";
          break;
        case "浦发银行":
          icon_url = "pufa";
          break;
        case "邮政银行":
          icon_url = "youzheng";
          break;
      }
      return icon_url;
    }
  },
  changeBank: function (str) {
   
    var m = str.split("");
    var num = '*'
    for (var i = 1; i < str.length - 4; i++) {
      num += '*'
    }
    m.splice(0, str.length - 4, num);
    var s = m.join("");
    return s;
  },
  subPhone: function (payer_phone) {
    return payer_phone.substring(0, 3) + "****" + payer_phone.substring(7)
  }
}
