js根据银⾏卡号进⾏判断属于哪个银⾏并返回银⾏卡类型
很实⽤⽅便实⽤的⽅法口红排行榜10强
function extend(target, source) {
var result = {};
var key;
target = target || {};
source = source || {};
for (key in target) {
if (target.hasOwnProperty(key)) {
result[key] = target[key];
}
}
for (key in source) {
if (source.hasOwnProperty(key)) {
result[key] = source[key];
}
}
return result;
}
function getCardTypeName(cardType) {
if (cardTypeMap[cardType]) {
return cardTypeMap[cardType]
}
return undefined;
}
var bankcardList = [{
bankName: "中国邮政储蓄银⾏",
bankCode: "PSBC",
patterns: [{
reg:
大学转专业/^(621096|621098|622150|622151|622181|622188|622199|955100|621095|620062|621285|621798|621799|621797|620529|621622|621599|621674|623218|623219)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(62215049|62215050|62215051|62218850|62218851|62218849)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(622812|622810|622811|628310|625919)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "中国⼯商银⾏",
bankCode: "ICBC",
patterns: [{
reg:
/
^(620200|620302|620402|620403|620404|620406|620407|620409|620410|620411|620412|620502|620503|620405|620408|620512|620602|620604|620607|620611|620612|620704|620706|620707|6 cardType: "DC"
}, {
reg:
/^(622200|622202|622203|622208|621225|620058|621281|900000|621558|621559|621722|621723|620086|621226|621618|620516|621227|621288|621721|900010|623062|621670|621720|621379|6 cardType: "DC"
}, {
reg:
/^(402791|427028|427038|548259|621376|621423|621428|621434|621761|621749|621300|621378|622944|622949|621371|621730|621734|621433|621370|621764|621464|621765|621750|621377|6 cardType: "DC"
}, {
reg: /^(9558)\d{15}$/g,
cardType: "DC"
}, {
reg: /^(370246|370248|370249|370247|370267|374738|374739)\d{9}$/g,
cardType: "CC"
}, {
reg:
/^(427010|427018|427019|427020|427029|427030|427039|438125|438126|451804|451810|451811|458071|489734|489735|489736|510529|427062|524091|427064|530970|530990|558360|524047|5 cardType: "CC"
}, {
reg: /^(45806|53098|45806|53098)\d{11}$/g,
cardType: "CC"
}, {
reg: /^(622210|622211|622212|622213|622214|622220|622223|622225|622229|622215|622224)\d{10}$/g,
cardType: "SCC"
}, {
reg: /^(620054|620142|620184|620030|620050|620143|620149|620124|620183|620094|620186|620148|620185)\d{10}$/g,
cardType: "PC"
}, {
reg: /^(620114|620187|620046)\d{13}$/g,
cardType: "PC"
}]
}, {
bankName: "中国农业银⾏",
bankCode: "ABC",
patterns: [{
reg:
/^(622841|622824|622826|622848|620059|621282|622828|622823|621336|621619|622821|622822|622825|622827|622845|622849|623018|623206|621671|622840|622843|622844|622846|622847|6 cardType: "DC"
}, {
reg: /^(95595|95596|95597|95598|95599)\d{14}$/g,
cardType: "DC"
}, {
reg: /^(103)\d{16}$/g,
cardType: "DC"
}, {
reg:
/^(403361|404117|404118|404119|404120|404121|463758|519412|519413|520082|520083|552599|558730|514027|622836|622837|628268|625996|625998|625997|622838|625336|625826|625827|5 cardType: "CC"
cardType: "SCC"
}]
}, {
bankName: "中国银⾏",
bankCode: "BOC",
patterns: [{
reg:
/
^(621660|621661|621662|621663|621665|621667|621668|621669|621666|456351|601382|621256|621212|621283|620061|621725|621330|621331|621332|621333|621297|621568|621569|621672|6 cardType: "DC"
}, {
reg: /^(621293|621294|621342|621343|621364|621394|621648|621248|621215|621249|621231|621638|621334|621395|623040|622348)\d{10}$/g,
cardType: "DC"
}, {
reg:
/^(625908|625910|625909|356833|356835|409665|409666|409668|409669|409670|409671|409672|512315|512316|512411|512412|514957|409667|438088|552742|553131|514958|622760|628388|5 cardType: "CC"
}, {
reg:
/
^(518378|518379|518474|518475|518476|524865|525745|525746|547766|558868|622752|622753|622755|524864|622757|622758|622759|622761|622762|622763|622756|622754|622764|622765|5 cardType: "SCC"
}, {
reg: /^(53591|49102|377677)\d{11}$/g,
cardType: "SCC"
}, {
reg: /^(620514|620025|620026|620210|620211|620019|620035|620202|620203|620048|620515|920000)\d{10}$/g,
cardType: "PC"
}, {
reg: /^(620040|620531|620513|921000|620038)\d{13}$/g,
cardType: "PC"
}]
}, {
bankName: "中国建设银⾏",
bankCode: "CCB",
patterns: [{
reg: /^(621284|436742|589970|620060|621081|621467|621598|621621|621700|622280|622700|623211|623668)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(421349|434061|434062|524094|526410|552245|621080|621082|621466|621488|621499|622966|622988|622382|621487|621083|621084|620107)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(436742193|622280193)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(553242)\d{12}$/g,
cardType: "CC"
}, {
reg:
/^(625362|625363|628316|628317|356896|356899|356895|436718|436738|436745|436748|489592|531693|532450|532458|544887|552801|557080|558895|559051|622166|622168|622708|625964|6 cardType: "CC"
}, {
reg: /^(5453242|5491031|5544033)\d{11}$/g,
cardType: "CC"
}, {
reg: /^(622725|622728|436728|453242|491031|544033|622707|625955|625956)\d{10}$/g,
cardType: "SCC"
}, {
reg: /^(53242|53243)\d{11}$/g,
cardType: "SCC"
}]
}, {
bankName: "中国交通银⾏",
bankCode: "COMM",
patterns: [{
reg: /^(622261|622260|622262|621002|621069|621436|621335)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(620013)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(405512|601428|405512|601428|622258|622259|405512|601428)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(49104|53783)\d{11}$/g,
cardType: "CC"
}, {
reg:
/^(434910|458123|458124|520169|522964|552853|622250|622251|521899|622253|622656|628216|622252|955590|955591|955592|955593|628218|625028|625029)\d{10}$/g,
cardType: "CC"
}, {
reg: /^(622254|622255|622256|622257|622284)\d{10}$/g,
cardType: "SCC"
}, {
reg: /^(620021|620521)\d{13}$/g,
万圣节是什么意思呀cardType: "PC"
}]
}, {
bankName: "招商银⾏",
bankCode: "CMB",
patterns: [{
reg: /^(402658|410062|468203|512425|524011|622580|622588|622598|622609|95555|621286|621483|621485|621486|621299)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(690755)\d{9}$/g,
cardType: "DC"
}, {
reg: /^(690755)\d{12}$/g,
cardType: "DC"
}, {
/^(356885|356886|356887|356888|356890|439188|439227|479228|479229|521302|356889|545620|545621|545947|545948|552534|552587|622575|622576|622577|622578|622579|545619|6 cardType: "CC"
}, {
reg: /^(370285|370286|370287|370289)\d{9}$/g,
cardType: "CC"
}, {
reg: /^(620520)\d{13}$/g,
cardType: "PC"
}]
}, {
bankName: "中国民⽣银⾏",
bankCode: "CMBC",
patterns: [{
reg: /^(622615|622616|622618|622622|622617|622619|415599|421393|421865|427570|427571|472067|472068|622620)\d{10}$/g,
cardType: "DC"
}, {
reg:
/^(545392|545393|545431|545447|356859|356857|407405|421869|421870|421871|512466|356856|528948|552288|622600|622601|622602|517636|622621|628258|556610|622603|464580|464581|5 cardType: "CC"
}, {
reg: /^(377155|377152|377153|377158)\d{9}$/g,
cardType: "CC"
}]
}, {
bankName: "中国光⼤银⾏",
bankCode: "CEB",
patterns: [{
reg: /^(303)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(90030)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(620535)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(620085|622660|622662|622663|622664|622665|622666|622667|622669|622670|622671|622672|622668|622661|622674|622673|620518|621489|621492)\d{10}$/g,
cardType: "DC"
}, {
reg:
/^(356837|356838|486497|622657|622685|622659|622687|625978|625980|625981|625979|356839|356840|406252|406254|425862|481699|524090|543159|622161|622570|622650|622655|622658|6 cardType: "CC"
}]
}, {
bankName: "中信银⾏",
bankCode: "CITIC",
patterns: [{
reg:
/^(433670|433680|442729|442730|620082|622690|622691|622692|622696|622698|622998|622999|433671|968807|968808|968809|621771|621767|621768|621770|621772|621773|622453|622456)\ cardType: "DC"
}, {
reg: /^(622459)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(376968|376969|376966)\d{9}$/g,
cardType: "CC"
}, {
reg:
/^(400360|403391|403392|404158|404159|404171|404172|404173|404174|404157|433667|433668|433669|514906|403393|520108|433666|558916|622678|622679|622680|622688|622689|628206|5 cardType: "CC"
}]
}, {
bankName: "华夏银⾏",
bankCode: "HXBANK",
patterns: [{
reg: /^(622630|622631|622632|622633|999999|621222|623020|623021|623022|623023)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(523959|528709|539867|539868|622637|622638|628318|528708|622636|625967|625968|625969)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "深发/平安银⾏",
bankCode: "SPABANK",
patterns: [{
reg: /^(621626|623058)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(602907|622986|622989|622298|627069|627068|627066|627067|412963|415752|415753|622535|622536|622538|622539|998800|412962|622983)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(531659|622157|528020|622155|622156|526855|356869|356868|625360|625361|628296|435744|435745|483536|622525|622526|998801|998802)\d{10}$/g,
cardType: "CC"
}, {
reg: /^(620010)\d{10}$/g,
cardType: "PC"
}]
}, {
bankName: "兴业银⾏",
bankCode: "CIB",
patterns: [{
reg: /^(438589)\d{12}$/g,
cardType: "DC"
}, {
reg: /^(90592)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(966666|622909|438588|622908)\d{12}$/g,
}, {
reg:
/^(461982|486493|486494|486861|523036|451289|527414|528057|622901|622902|622922|628212|451290|524070|625084|625085|625086|625087|548738|549633|552398|625082|625083|625960|6 cardType: "CC"
}, {
reg: /^(620010)\d{10}$/g,
cardType: "PC"
}]
}, {
bankName: "上海银⾏",
bankCode: "SHBANK",
patterns: [{
reg: /^(621050|622172|622985|622987|620522|622267|622278|622279|622468|622892|940021)\d{12}$/g,
cardType: "DC"
}, {
reg: /^(438600)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(356827|356828|356830|402673|402674|486466|519498|520131|524031|548838|622148|622149|622268|356829|622300|628230|622269|625099|625953)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "浦东发展银⾏",
bankCode: "SPDB",
patterns: [{
reg: /^(622516|622517|622518|622521|622522|622523|984301|984303|621352|621793|621795|621796|621351|621390|621792|621791)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(84301|84336|84373|84385|84390|87000|87010|87030|87040|84380|84361|87050|84342)\d{11}$/g,
cardType: "DC"
}, {
steam无法连接到网络怎么办
reg:
/^(356851|356852|404738|404739|456418|498451|515672|356850|517650|525998|622177|622277|628222|622500|628221|622176|622276|622228|625957|625958|625993|625831)\d{10}$/g, cardType: "CC"
}, {
reg: /^(622520|622519)\d{10}$/g,
cardType: "SCC"
}, {
reg: /^(620530)\d{13}$/g,
cardType: "PC"
}]
}, {
bankName: "⼴发银⾏",
bankCode: "GDB",
patterns: [{
reg: /^(622516|622517|622518|622521|622522|622523|984301|984303|621352|621793|621795|621796|621351|621390|621792|621791)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622568|6858001|6858009|621462)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(9111)\d{15}$/g,
cardType: "DC"
}, {关于立夏的美好诗句
reg:
/^(406365|406366|428911|436768|436769|436770|487013|491032|491033|491034|491035|491036|491037|491038|436771|518364|520152|520382|541709|541710|548844|552794|493427|622555|6 cardType: "CC"
}, {
reg: /^(685800|6858000)\d{13}$/g,
cardType: "CC"
}]
}, {
bankName: "渤海银⾏",
bankCode: "BOHAIB",
patterns: [{
reg: /^(621268|622684|622884|621453)\d{10}$/g,
cardType: "DC"
}]
}, {
bankName: "⼴州银⾏",
bankCode: "GCB",
patterns: [{
reg: /^(603445|622467|940016|621463)\d{13}$/g,
cardType: "DC"
}]
}, {
bankName: "⾦华银⾏",
bankCode: "JHBANK",
patterns: [{
reg: /^(622449|940051)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622450|628204)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "温州银⾏",
bankCode: "WZCB",
patterns: [{
reg: /^(621977)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622868|622899|628255)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "徽商银⾏",
bankCode: "HSBANK",
reg: /^(622877|622879|621775|623203)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(603601|622137|622327|622340|622366)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(628251|622651|625828)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "江苏银⾏",
bankCode: "JSBANK",
patterns: [{
reg: /^(621076|622173|622131|621579|622876)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(504923|622422|622447|940076)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(628210|622283|625902)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "南京银⾏",
bankCode: "NJCB",
patterns: [{
reg: /^(621777|622305|621259)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622303|628242|622595|622596)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "宁波银⾏",
bankCode: "NBBANK",
patterns: [{
reg: /^(621279|622281|622316|940022)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(621418)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(625903|622778|628207|512431|520194|622282|622318)\d{10}$/g, cardType: "CC"
}]
}, {
bankName: "北京银⾏",
bankCode: "BJBANK",
patterns: [{
reg: /^(623111|421317|422161|602969|422160|621030|621420|621468)\d{10}$/g, cardType: "DC"
}, {
reg: /^(522001|622163|622853|628203|622851|622852)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "北京农村商业银⾏",
bankCode: "BJRCB",
patterns: [{
reg: /^(620088|621068|622138|621066|621560)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(625526|625186|628336)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "汇丰银⾏",
bankCode: "HSBC",
patterns: [{
reg: /^(622946)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622406|621442)\d{11}$/g,
cardType: "DC"
}, {
reg: /^(622407|621443)\d{13}$/g,
cardType: "DC"
}, {
reg: /^(622360|622361|625034|625096|625098)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "渣打银⾏",
bankCode: "SCB",
a女演员介绍patterns: [{
reg: /^(622948|621740|622942|622994)\d{10}$/g,
cardType: "DC"
}, {
reg: /^(622482|622483|622484)\d{10}$/g,
cardType: "CC"
}]
}, {
bankName: "花旗银⾏",
bankCode: "CITI",
patterns: [{
reg: /^(621062|621063)\d{10}$/g,
cardType: "DC"
}, {