shareCash.js 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643
  1. const util = require("../../utils/util.js");
  2. const app = getApp();
  3. Page({
  4. data: {
  5. info : {},
  6. price: "100.00",
  7. okPrice: "0.00",
  8. okPriceText: "0.00元",
  9. payType : 0
  10. },
  11. onLoad(){
  12. this.info();
  13. },
  14. // 获取用户角色、佣金等信息
  15. info(){
  16. let self = this;
  17. util.ajax({
  18. func: 'coin/countinfo',
  19. load: false
  20. }, function (res) {
  21. if (res.code == 0) {
  22. res.data.minprice = 1;
  23. self.setData({ info : res.data, price: res.data.minprice });
  24. } else {
  25. util.showTips(res.reason);
  26. }
  27. });
  28. },
  29. // 表单验证
  30. blurChange(e){
  31. if (this.data.info.scale != 1) return false;
  32. let val = e.detail.value, data = e.currentTarget.dataset;
  33. if (parseFloat(val) > data.place) {
  34. util.showTips("提现金额已经超出钱包余额")
  35. } else if (parseFloat(val) < parseFloat(data.minprice)) {
  36. util.showTips("提现金额必须大于最小金额(" + data.minprice + "元)")
  37. }
  38. },
  39. radioChange(e){
  40. let payType = e.detail.value;
  41. this.setData({ payType });
  42. },
  43. bankType(e) {
  44. let val = e.detail.value, bank = this.bankCardAttribution(val), bankName = "";
  45. if (!util.isEmpty(val) && bank != 'error') {
  46. bankName = bank['bankName'];
  47. }
  48. this.setData({ bankName});
  49. },
  50. // 表单提交
  51. formSubmit(e){
  52. let data = e.detail.value;
  53. console.log(data)
  54. let that = this;
  55. if (util.isEmpty(data['withdraw_price']) || parseFloat(data['withdraw_price']) == parseFloat(0.00)) {
  56. util.showTips("请填写需要提现的金额。");
  57. return false;
  58. }
  59. if (parseFloat(this.data.info.balance) < this.data.info.maxCashCoin && this.data.info.userRoleType == "sharer") {
  60. util.showTips(`您的余额不满${this.data.info.maxCashCoin}元,不可提现。`);
  61. return false;
  62. }
  63. if (parseFloat(this.data.info.balance) < this.data.info.organCashCoin && (this.data.info.userRoleType == "organ" || this.data.info.userRoleType == "normal")) {
  64. util.showTips(`您的余额不满${this.data.info.organCashCoin}元,不可提现。`);
  65. return false;
  66. }
  67. if (parseFloat(data['withdraw_price']) < 1) {
  68. util.showTips("您填写的金额小于最小提现金额(1元)。");
  69. return false;
  70. }
  71. if(this.data.payType == 0){
  72. if (util.isEmpty(data['name'])) {
  73. util.showTips("请填写真实姓名。");
  74. return false;
  75. }
  76. if (util.isEmpty(data['idcard'])) {
  77. util.showTips("请填写身份证号。");
  78. return false;
  79. }
  80. if (!util.identityCodeValid(0, data['idcard'])) {
  81. util.showTips('请填写正确的' + util.cardType(0) + '。');
  82. return false;
  83. }
  84. if (util.isEmpty(data['account'])) {
  85. util.showTips("请填写支付宝账号。");
  86. return false;
  87. }
  88. }
  89. if(this.data.payType == 2){
  90. if (util.isEmpty(data['name'])) {
  91. util.showTips("请填写真实姓名。");
  92. return false;
  93. }
  94. if (util.isEmpty(data['idcard'])) {
  95. util.showTips("请填写身份证号。");
  96. return false;
  97. }
  98. if (!util.identityCodeValid(0, data['idcard'])) {
  99. util.showTips('请填写正确的' + util.cardType(0) + '。');
  100. return false;
  101. }
  102. if (util.isEmpty(data['account'])) {
  103. util.showTips("请填写银行卡号。");
  104. return false;
  105. }
  106. if (this.bankCardAttribution(data['account']) == 'error') {
  107. util.showTips("您填写银行卡号不正确。");
  108. return false;
  109. }
  110. if (util.isEmpty(data['bankType'])) {
  111. util.showTips("请填写银行,如工商银行。");
  112. return false;
  113. }
  114. if (util.isEmpty(data['openBank'])) {
  115. util.showTips("请填写开户行。");
  116. return false;
  117. }
  118. }
  119. data['price'] = util.toMoney(data.withdraw_price);
  120. util.ajax({
  121. func: "coin/withdraw",
  122. data: data,
  123. // method:'POST'
  124. }, function (res) {
  125. if (res.code == 0) {
  126. wx.showModal({
  127. title: "提示",
  128. content: '您的提现申请已提交,我们将在3个工作日处理完,请到钱包记录查看。',
  129. showCancel:false,
  130. success(){
  131. wx.navigateBack({
  132. url: '/pages/sharingHome/wallet',
  133. });
  134. }
  135. });
  136. } else {
  137. util.showTips(res.reason);
  138. }
  139. });
  140. },
  141. bankCardAttribution(bankCard){
  142. var cardTypeMap = {
  143. DC: "储蓄卡",
  144. CC: "信用卡",
  145. SCC: "准贷记卡",
  146. PC: "预付费卡"
  147. };
  148. function extend(target, source) {
  149. var result = {};
  150. var key;
  151. target = target || {};
  152. source = source || {};
  153. for (key in target) {
  154. if (target.hasOwnProperty(key)) {
  155. result[key] = target[key];
  156. }
  157. }
  158. for (key in source) {
  159. if (source.hasOwnProperty(key)) {
  160. result[key] = source[key];
  161. }
  162. }
  163. return result;
  164. }
  165. function getCardTypeName(cardType) {
  166. if (cardTypeMap[cardType]) {
  167. return cardTypeMap[cardType]
  168. }
  169. return undefined;
  170. }
  171. var bankcardList = [{
  172. bankName: "中国邮政储蓄银行",
  173. bankCode: "PSBC",
  174. patterns: [{
  175. reg: /^(621096|621098|622150|622151|622181|622188|622199|955100|621095|620062|621285|621798|621799|621797|620529|621622|621599|621674|623218|623219)\d{13}$/g,
  176. cardType: "DC"
  177. }, {
  178. reg: /^(62215049|62215050|62215051|62218850|62218851|62218849)\d{11}$/g,
  179. cardType: "DC"
  180. }, {
  181. reg: /^(622812|622810|622811|628310|625919)\d{10}$/g,
  182. cardType: "CC"
  183. }]
  184. }, {
  185. bankName: "中国工商银行",
  186. bankCode: "ICBC",
  187. patterns: [{
  188. 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|620708|620709|620710|620609|620712|620713|620714|620802|620711|620904|620905|621001|620902|621103|621105|621106|621107|621102|621203|621204|621205|621206|621207|621208|621209|621210|621302|621303|621202|621305|621306|621307|621309|621311|621313|621211|621315|621304|621402|621404|621405|621406|621407|621408|621409|621410|621502|621317|621511|621602|621603|621604|621605|621608|621609|621610|621611|621612|621613|621614|621615|621616|621617|621607|621606|621804|621807|621813|621814|621817|621901|621904|621905|621906|621907|621908|621909|621910|621911|621912|621913|621915|622002|621903|622004|622005|622006|622007|622008|622010|622011|622012|621914|622015|622016|622003|622018|622019|622020|622102|622103|622104|622105|622013|622111|622114|622017|622110|622303|622304|622305|622306|622307|622308|622309|622314|622315|622317|622302|622402|622403|622404|622313|622504|622505|622509|622513|622517|622502|622604|622605|622606|622510|622703|622715|622806|622902|622903|622706|623002|623006|623008|623011|623012|622904|623015|623100|623202|623301|623400|623500|623602|623803|623901|623014|624100|624200|624301|624402|623700|624000)\d{12}$/g,
  189. cardType: "DC"
  190. }, {
  191. 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|621240|621724|621762|621414|621375|622926|622927|622928|622929|622930|622931|621733|621732|621372|621369|621763)\d{13}$/g,
  192. cardType: "DC"
  193. }, {
  194. 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|621367|621374|621731|621781)\d{10}$/g,
  195. cardType: "DC"
  196. }, {
  197. reg: /^(9558)\d{15}$/g,
  198. cardType: "DC"
  199. }, {
  200. reg: /^(370246|370248|370249|370247|370267|374738|374739)\d{9}$/g,
  201. cardType: "CC"
  202. }, {
  203. 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|525498|622230|622231|622232|622233|622234|622235|622237|622239|622240|622245|622238|451804|451810|451811|458071|628288|628286|622206|526836|513685|543098|458441|622246|544210|548943|356879|356880|356881|356882|528856|625330|625331|625332|622236|524374|550213|625929|625927|625939|625987|625930|625114|622159|625021|625022|625932|622889|625900|625915|625916|622171|625931|625113|625928|625914|625986|625925|625921|625926|625942|622158|625917|625922|625934|625933|625920|625924|625017|625018|625019)\d{10}$/g,
  204. cardType: "CC"
  205. }, {
  206. reg: /^(45806|53098|45806|53098)\d{11}$/g,
  207. cardType: "CC"
  208. }, {
  209. reg: /^(622210|622211|622212|622213|622214|622220|622223|622225|622229|622215|622224)\d{10}$/g,
  210. cardType: "SCC"
  211. }, {
  212. reg: /^(620054|620142|620184|620030|620050|620143|620149|620124|620183|620094|620186|620148|620185)\d{10}$/g,
  213. cardType: "PC"
  214. }, {
  215. reg: /^(620114|620187|620046)\d{13}$/g,
  216. cardType: "PC"
  217. }]
  218. }, {
  219. bankName: "中国农业银行",
  220. bankCode: "ABC",
  221. patterns: [{
  222. 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|620501)\d{13}$/g,
  223. cardType: "DC"
  224. }, {
  225. reg: /^(95595|95596|95597|95598|95599)\d{14}$/g,
  226. cardType: "DC"
  227. }, {
  228. reg: /^(103)\d{16}$/g,
  229. cardType: "DC"
  230. }, {
  231. 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|544243|548478|628269)\d{10}$/g,
  232. cardType: "CC"
  233. }, {
  234. reg: /^(622820|622830)\d{10}$/g,
  235. cardType: "SCC"
  236. }]
  237. }, {
  238. bankName: "中国银行",
  239. bankCode: "BOC",
  240. patterns: [{
  241. 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|623208|621620|621756|621757|621758|621759|621785|621786|621787|621788|621789|621790|622273|622274|622771|622772|622770|621741|621041)\d{13}$/g,
  242. cardType: "DC"
  243. }, {
  244. reg: /^(621293|621294|621342|621343|621364|621394|621648|621248|621215|621249|621231|621638|621334|621395|623040|622348)\d{10}$/g,
  245. cardType: "DC"
  246. }, {
  247. 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|518377|622788|628313|628312|622750|622751|625145|622479|622480|622789|625140|622346|622347)\d{10}$/g,
  248. cardType: "CC"
  249. }, {
  250. 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|558869|625905|625906|625907|625333)\d{10}$/g,
  251. cardType: "SCC"
  252. }, {
  253. reg: /^(53591|49102|377677)\d{11}$/g,
  254. cardType: "SCC"
  255. }, {
  256. reg: /^(620514|620025|620026|620210|620211|620019|620035|620202|620203|620048|620515|920000)\d{10}$/g,
  257. cardType: "PC"
  258. }, {
  259. reg: /^(620040|620531|620513|921000|620038)\d{13}$/g,
  260. cardType: "PC"
  261. }]
  262. }, {
  263. bankName: "中国建设银行",
  264. bankCode: "CCB",
  265. patterns: [{
  266. reg: /^(621284|436742|589970|620060|621081|621467|621598|621621|621700|622280|622700|623211|623668)\d{13}$/g,
  267. cardType: "DC"
  268. }, {
  269. reg: /^(421349|434061|434062|524094|526410|552245|621080|621082|621466|621488|621499|622966|622988|622382|621487|621083|621084|620107)\d{10}$/g,
  270. cardType: "DC"
  271. }, {
  272. reg: /^(436742193|622280193)\d{10}$/g,
  273. cardType: "DC"
  274. }, {
  275. reg: /^(553242)\d{12}$/g,
  276. cardType: "CC"
  277. }, {
  278. 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|625965|625966|628266|628366|622381|622675|622676|622677)\d{10}$/g,
  279. cardType: "CC"
  280. }, {
  281. reg: /^(5453242|5491031|5544033)\d{11}$/g,
  282. cardType: "CC"
  283. }, {
  284. reg: /^(622725|622728|436728|453242|491031|544033|622707|625955|625956)\d{10}$/g,
  285. cardType: "SCC"
  286. }, {
  287. reg: /^(53242|53243)\d{11}$/g,
  288. cardType: "SCC"
  289. }]
  290. }, {
  291. bankName: "中国交通银行",
  292. bankCode: "COMM",
  293. patterns: [{
  294. reg: /^(622261|622260|622262|621002|621069|621436|621335)\d{13}$/g,
  295. cardType: "DC"
  296. }, {
  297. reg: /^(620013)\d{10}$/g,
  298. cardType: "DC"
  299. }, {
  300. reg: /^(405512|601428|405512|601428|622258|622259|405512|601428)\d{11}$/g,
  301. cardType: "DC"
  302. }, {
  303. reg: /^(49104|53783)\d{11}$/g,
  304. cardType: "CC"
  305. }, {
  306. reg: /^(434910|458123|458124|520169|522964|552853|622250|622251|521899|622253|622656|628216|622252|955590|955591|955592|955593|628218|625028|625029)\d{10}$/g,
  307. cardType: "CC"
  308. }, {
  309. reg: /^(622254|622255|622256|622257|622284)\d{10}$/g,
  310. cardType: "SCC"
  311. }, {
  312. reg: /^(620021|620521)\d{13}$/g,
  313. cardType: "PC"
  314. }]
  315. }, {
  316. bankName: "招商银行",
  317. bankCode: "CMB",
  318. patterns: [{
  319. reg: /^(402658|410062|468203|512425|524011|622580|622588|622598|622609|95555|621286|621483|621485|621486|621299)\d{10}$/g,
  320. cardType: "DC"
  321. }, {
  322. reg: /^(690755)\d{9}$/g,
  323. cardType: "DC"
  324. }, {
  325. reg: /^(690755)\d{12}$/g,
  326. cardType: "DC"
  327. }, {
  328. reg: /^(356885|356886|356887|356888|356890|439188|439227|479228|479229|521302|356889|545620|545621|545947|545948|552534|552587|622575|622576|622577|622578|622579|545619|622581|622582|545623|628290|439225|518710|518718|628362|439226|628262|625802|625803)\d{10}$/g,
  329. cardType: "CC"
  330. }, {
  331. reg: /^(370285|370286|370287|370289)\d{9}$/g,
  332. cardType: "CC"
  333. }, {
  334. reg: /^(620520)\d{13}$/g,
  335. cardType: "PC"
  336. }]
  337. }, {
  338. bankName: "中国民生银行",
  339. bankCode: "CMBC",
  340. patterns: [{
  341. reg: /^(622615|622616|622618|622622|622617|622619|415599|421393|421865|427570|427571|472067|472068|622620)\d{10}$/g,
  342. cardType: "DC"
  343. }, {
  344. 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|523952|545217|553161|356858|622623|625912|625913|625911)\d{10}$/g,
  345. cardType: "CC"
  346. }, {
  347. reg: /^(377155|377152|377153|377158)\d{9}$/g,
  348. cardType: "CC"
  349. }]
  350. }, {
  351. bankName: "中国光大银行",
  352. bankCode: "CEB",
  353. patterns: [{
  354. reg: /^(303)\d{13}$/g,
  355. cardType: "DC"
  356. }, {
  357. reg: /^(90030)\d{11}$/g,
  358. cardType: "DC"
  359. }, {
  360. reg: /^(620535)\d{13}$/g,
  361. cardType: "DC"
  362. }, {
  363. reg: /^(620085|622660|622662|622663|622664|622665|622666|622667|622669|622670|622671|622672|622668|622661|622674|622673|620518|621489|621492)\d{10}$/g,
  364. cardType: "DC"
  365. }, {
  366. 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|625975|625977|628201|628202|625339|625976)\d{10}$/g,
  367. cardType: "CC"
  368. }]
  369. }, {
  370. bankName: "中信银行",
  371. bankCode: "CITIC",
  372. patterns: [{
  373. 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)\d{10}$/g,
  374. cardType: "DC"
  375. }, {
  376. reg: /^(622459)\d{11}$/g,
  377. cardType: "DC"
  378. }, {
  379. reg: /^(376968|376969|376966)\d{9}$/g,
  380. cardType: "CC"
  381. }, {
  382. 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|556617|628209|518212|628208|356390|356391|356392|622916|622918|622919)\d{10}$/g,
  383. cardType: "CC"
  384. }]
  385. }, {
  386. bankName: "华夏银行",
  387. bankCode: "HXBANK",
  388. patterns: [{
  389. reg: /^(622630|622631|622632|622633|999999|621222|623020|623021|623022|623023)\d{10}$/g,
  390. cardType: "DC"
  391. }, {
  392. reg: /^(523959|528709|539867|539868|622637|622638|628318|528708|622636|625967|625968|625969)\d{10}$/g,
  393. cardType: "CC"
  394. }]
  395. }, {
  396. bankName: "深发/平安银行",
  397. bankCode: "SPABANK",
  398. patterns: [{
  399. reg: /^(621626|623058)\d{13}$/g,
  400. cardType: "DC"
  401. }, {
  402. reg: /^(602907|622986|622989|622298|627069|627068|627066|627067|412963|415752|415753|622535|622536|622538|622539|998800|412962|622983)\d{10}$/g,
  403. cardType: "DC"
  404. }, {
  405. reg: /^(531659|622157|528020|622155|622156|526855|356869|356868|625360|625361|628296|435744|435745|483536|622525|622526|998801|998802)\d{10}$/g,
  406. cardType: "CC"
  407. }, {
  408. reg: /^(620010)\d{10}$/g,
  409. cardType: "PC"
  410. }]
  411. }, {
  412. bankName: "兴业银行",
  413. bankCode: "CIB",
  414. patterns: [{
  415. reg: /^(438589)\d{12}$/g,
  416. cardType: "DC"
  417. }, {
  418. reg: /^(90592)\d{11}$/g,
  419. cardType: "DC"
  420. }, {
  421. reg: /^(966666|622909|438588|622908)\d{12}$/g,
  422. cardType: "DC"
  423. }, {
  424. 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|625961|625962|625963)\d{10}$/g,
  425. cardType: "CC"
  426. }, {
  427. reg: /^(620010)\d{10}$/g,
  428. cardType: "PC"
  429. }]
  430. }, {
  431. bankName: "上海银行",
  432. bankCode: "SHBANK",
  433. patterns: [{
  434. reg: /^(621050|622172|622985|622987|620522|622267|622278|622279|622468|622892|940021)\d{12}$/g,
  435. cardType: "DC"
  436. }, {
  437. reg: /^(438600)\d{10}$/g,
  438. cardType: "DC"
  439. }, {
  440. reg: /^(356827|356828|356830|402673|402674|486466|519498|520131|524031|548838|622148|622149|622268|356829|622300|628230|622269|625099|625953)\d{10}$/g,
  441. cardType: "CC"
  442. }]
  443. }, {
  444. bankName: "浦东发展银行",
  445. bankCode: "SPDB",
  446. patterns: [{
  447. reg: /^(622516|622517|622518|622521|622522|622523|984301|984303|621352|621793|621795|621796|621351|621390|621792|621791)\d{10}$/g,
  448. cardType: "DC"
  449. }, {
  450. reg: /^(84301|84336|84373|84385|84390|87000|87010|87030|87040|84380|84361|87050|84342)\d{11}$/g,
  451. cardType: "DC"
  452. }, {
  453. 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,
  454. cardType: "CC"
  455. }, {
  456. reg: /^(622520|622519)\d{10}$/g,
  457. cardType: "SCC"
  458. }, {
  459. reg: /^(620530)\d{13}$/g,
  460. cardType: "PC"
  461. }]
  462. }, {
  463. bankName: "广发银行",
  464. bankCode: "GDB",
  465. patterns: [{
  466. reg: /^(622516|622517|622518|622521|622522|622523|984301|984303|621352|621793|621795|621796|621351|621390|621792|621791)\d{10}$/g,
  467. cardType: "DC"
  468. }, {
  469. reg: /^(622568|6858001|6858009|621462)\d{13}$/g,
  470. cardType: "DC"
  471. }, {
  472. reg: /^(9111)\d{15}$/g,
  473. cardType: "DC"
  474. }, {
  475. 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|622556|622557|622558|622559|622560|528931|558894|625072|625071|628260|628259|625805|625806|625807|625808|625809|625810)\d{10}$/g,
  476. cardType: "CC"
  477. }, {
  478. reg: /^(685800|6858000)\d{13}$/g,
  479. cardType: "CC"
  480. }]
  481. }, {
  482. bankName: "渤海银行",
  483. bankCode: "BOHAIB",
  484. patterns: [{
  485. reg: /^(621268|622684|622884|621453)\d{10}$/g,
  486. cardType: "DC"
  487. }]
  488. }, {
  489. bankName: "广州银行",
  490. bankCode: "GCB",
  491. patterns: [{
  492. reg: /^(603445|622467|940016|621463)\d{13}$/g,
  493. cardType: "DC"
  494. }]
  495. }, {
  496. bankName: "金华银行",
  497. bankCode: "JHBANK",
  498. patterns: [{
  499. reg: /^(622449|940051)\d{10}$/g,
  500. cardType: "DC"
  501. }, {
  502. reg: /^(622450|628204)\d{10}$/g,
  503. cardType: "CC"
  504. }]
  505. }, {
  506. bankName: "温州银行",
  507. bankCode: "WZCB",
  508. patterns: [{
  509. reg: /^(621977)\d{10}$/g,
  510. cardType: "DC"
  511. }, {
  512. reg: /^(622868|622899|628255)\d{10}$/g,
  513. cardType: "CC"
  514. }]
  515. }, {
  516. bankName: "徽商银行",
  517. bankCode: "HSBANK",
  518. patterns: [{
  519. reg: /^(622877|622879|621775|623203)\d{13}$/g,
  520. cardType: "DC"
  521. }, {
  522. reg: /^(603601|622137|622327|622340|622366)\d{11}$/g,
  523. cardType: "DC"
  524. }, {
  525. reg: /^(628251|622651|625828)\d{10}$/g,
  526. cardType: "CC"
  527. }]
  528. }, {
  529. bankName: "江苏银行",
  530. bankCode: "JSBANK",
  531. patterns: [{
  532. reg: /^(621076|622173|622131|621579|622876)\d{13}$/g,
  533. cardType: "DC"
  534. }, {
  535. reg: /^(504923|622422|622447|940076)\d{10}$/g,
  536. cardType: "DC"
  537. }, {
  538. reg: /^(628210|622283|625902)\d{10}$/g,
  539. cardType: "CC"
  540. }]
  541. }, {
  542. bankName: "南京银行",
  543. bankCode: "NJCB",
  544. patterns: [{
  545. reg: /^(621777|622305|621259)\d{10}$/g,
  546. cardType: "DC"
  547. }, {
  548. reg: /^(622303|628242|622595|622596)\d{10}$/g,
  549. cardType: "CC"
  550. }]
  551. }, {
  552. bankName: "宁波银行",
  553. bankCode: "NBBANK",
  554. patterns: [{
  555. reg: /^(621279|622281|622316|940022)\d{10}$/g,
  556. cardType: "DC"
  557. }, {
  558. reg: /^(621418)\d{13}$/g,
  559. cardType: "DC"
  560. }, {
  561. reg: /^(625903|622778|628207|512431|520194|622282|622318)\d{10}$/g,
  562. cardType: "CC"
  563. }]
  564. }, {
  565. bankName: "北京银行",
  566. bankCode: "BJBANK",
  567. patterns: [{
  568. reg: /^(623111|421317|422161|602969|422160|621030|621420|621468)\d{10}$/g,
  569. cardType: "DC"
  570. }, {
  571. reg: /^(522001|622163|622853|628203|622851|622852)\d{10}$/g,
  572. cardType: "CC"
  573. }]
  574. }, {
  575. bankName: "北京农村商业银行",
  576. bankCode: "BJRCB",
  577. patterns: [{
  578. reg: /^(620088|621068|622138|621066|621560)\d{13}$/g,
  579. cardType: "DC"
  580. }, {
  581. reg: /^(625526|625186|628336)\d{10}$/g,
  582. cardType: "CC"
  583. }]
  584. }, {
  585. bankName: "汇丰银行",
  586. bankCode: "HSBC",
  587. patterns: [{
  588. reg: /^(622946)\d{10}$/g,
  589. cardType: "DC"
  590. }, {
  591. reg: /^(622406|621442)\d{11}$/g,
  592. cardType: "DC"
  593. }, {
  594. reg: /^(622407|621443)\d{13}$/g,
  595. cardType: "DC"
  596. }, {
  597. reg: /^(622360|622361|625034|625096|625098)\d{10}$/g,
  598. cardType: "CC"
  599. }]
  600. }, {
  601. bankName: "渣打银行",
  602. bankCode: "SCB",
  603. patterns: [{
  604. reg: /^(622948|621740|622942|622994)\d{10}$/g,
  605. cardType: "DC"
  606. }, {
  607. reg: /^(622482|622483|622484)\d{10}$/g,
  608. cardType: "CC"
  609. }]
  610. }, {
  611. bankName: "花旗银行",
  612. bankCode: "CITI",
  613. patterns: [{
  614. reg: /^(621062|621063)\d{10}$/g,
  615. cardType: "DC"
  616. }, {
  617. reg: /^(625076|625077|625074|625075|622371|625091)\d{10}$/g,
  618. cardType: "CC"
  619. }]
  620. }, {
  621. bankName: "东亚银行",
  622. bankCode: "HKBEA",
  623. patterns: [{
  624. reg: /^(622933|622938|623031|622943|621411)\d{13}$/g,
  625. cardType: "DC"
  626. }, {
  627. reg: /^(622372|622471|622472|622265|622266|625972|625973)\d{10}$/g,
  628. cardType: "CC"
  629. }, {
  630. reg: /^(622365)\d{11}$/g,
  631. cardType: "CC"
  632. }]
  633. }, {
  634. bankName: "广东华兴银行",
  635. bankCode: "GHB",
  636. patterns: [{
  637. reg: /^(621469|621625)\d{13}$/g,
  638. cardType: "DC"
  639. }]
  640. }, {
  641. bankName: "深圳农村商业银行",
  642. bankCode: "SRCB",
  643. patterns: [{
  644. reg: /^(622128|622129|623035)\d{10}$/g,
  645. cardType: "DC"
  646. }]
  647. }, {
  648. bankName: "广州农村商业银行股份有限公司",
  649. bankCode: "GZRCU",
  650. patterns: [{
  651. reg: /^(909810|940035|621522|622439)\d{12}$/g,
  652. cardType: "DC"
  653. }]
  654. }, {
  655. bankName: "东莞农村商业银行",
  656. bankCode: "DRCBCL",
  657. patterns: [{
  658. reg: /^(622328|940062|623038)\d{13}$/g,
  659. cardType: "DC"
  660. }, {
  661. reg: /^(625288|625888)\d{10}$/g,
  662. cardType: "CC"
  663. }]
  664. }, {
  665. bankName: "东莞市商业银行",
  666. bankCode: "BOD",
  667. patterns: [{
  668. reg: /^(622333|940050)\d{10}$/g,
  669. cardType: "DC"
  670. }, {
  671. reg: /^(621439|623010)\d{13}$/g,
  672. cardType: "DC"
  673. }, {
  674. reg: /^(622888)\d{10}$/g,
  675. cardType: "CC"
  676. }]
  677. }, {
  678. bankName: "广东省农村信用社联合社",
  679. bankCode: "GDRCC",
  680. patterns: [{
  681. reg: /^(622302)\d{10}$/g,
  682. cardType: "DC"
  683. }, {
  684. reg: /^(622477|622509|622510|622362|621018|621518)\d{13}$/g,
  685. cardType: "DC"
  686. }]
  687. }, {
  688. bankName: "大新银行",
  689. bankCode: "DSB",
  690. patterns: [{
  691. reg: /^(622297|621277)\d{10}$/g,
  692. cardType: "DC"
  693. }, {
  694. reg: /^(622375|622489)\d{11}$/g,
  695. cardType: "DC"
  696. }, {
  697. reg: /^(622293|622295|622296|622373|622451|622294|625940)\d{10}$/g,
  698. cardType: "CC"
  699. }]
  700. }, {
  701. bankName: "永亨银行",
  702. bankCode: "WHB",
  703. patterns: [{
  704. reg: /^(622871|622958|622963|622957|622861|622932|622862|621298)\d{10}$/g,
  705. cardType: "DC"
  706. }, {
  707. reg: /^(622798|625010|622775|622785)\d{10}$/g,
  708. cardType: "CC"
  709. }]
  710. }, {
  711. bankName: "星展银行香港有限公司",
  712. bankCode: "DBS",
  713. patterns: [{
  714. reg: /^(621016|621015)\d{13}$/g,
  715. cardType: "DC"
  716. }, {
  717. reg: /^(622487|622490|622491|622492)\d{10}$/g,
  718. cardType: "DC"
  719. }, {
  720. reg: /^(622487|622490|622491|622492|621744|621745|621746|621747)\d{11}$/g,
  721. cardType: "DC"
  722. }]
  723. }, {
  724. bankName: "恒丰银行",
  725. bankCode: "EGBANK",
  726. patterns: [{
  727. reg: /^(623078)\d{13}$/g,
  728. cardType: "DC"
  729. }, {
  730. reg: /^(622384|940034)\d{11}$/g,
  731. cardType: "DC"
  732. }]
  733. }, {
  734. bankName: "天津市商业银行",
  735. bankCode: "TCCB",
  736. patterns: [{
  737. reg: /^(940015|622331)\d{12}$/g,
  738. cardType: "DC"
  739. }, {
  740. reg: /^(6091201)\d{11}$/g,
  741. cardType: "DC"
  742. }, {
  743. reg: /^(622426|628205)\d{10}$/g,
  744. cardType: "CC"
  745. }]
  746. }, {
  747. bankName: "浙商银行",
  748. bankCode: "CZBANK",
  749. patterns: [{
  750. reg: /^(621019|622309|621019)\d{13}$/g,
  751. cardType: "DC"
  752. }, {
  753. reg: /^(6223091100|6223092900|6223093310|6223093320|6223093330|6223093370|6223093380|6223096510|6223097910)\d{9}$/g,
  754. cardType: "DC"
  755. }]
  756. }, {
  757. bankName: "南洋商业银行",
  758. bankCode: "NCB",
  759. patterns: [{
  760. reg: /^(621213|621289|621290|621291|621292|621042|621743)\d{13}$/g,
  761. cardType: "DC"
  762. }, {
  763. reg: /^(623041|622351)\d{10}$/g,
  764. cardType: "DC"
  765. }, {
  766. reg: /^(625046|625044|625058|622349|622350)\d{10}$/g,
  767. cardType: "CC"
  768. }, {
  769. reg: /^(620208|620209|625093|625095)\d{10}$/g,
  770. cardType: "PC"
  771. }]
  772. }, {
  773. bankName: "厦门银行",
  774. bankCode: "XMBANK",
  775. patterns: [{
  776. reg: /^(622393|940023)\d{10}$/g,
  777. cardType: "DC"
  778. }, {
  779. reg: /^(6886592)\d{11}$/g,
  780. cardType: "DC"
  781. }, {
  782. reg: /^(623019|621600|)\d{13}$/g,
  783. cardType: "DC"
  784. }]
  785. }, {
  786. bankName: "福建海峡银行",
  787. bankCode: "FJHXBC",
  788. patterns: [{
  789. reg: /^(622388)\d{10}$/g,
  790. cardType: "DC"
  791. }, {
  792. reg: /^(621267|623063)\d{12}$/g,
  793. cardType: "DC"
  794. }, {
  795. reg: /^(620043|)\d{12}$/g,
  796. cardType: "PC"
  797. }]
  798. }, {
  799. bankName: "吉林银行",
  800. bankCode: "JLBANK",
  801. patterns: [{
  802. reg: /^(622865|623131)\d{13}$/g,
  803. cardType: "DC"
  804. }, {
  805. reg: /^(940012)\d{10}$/g,
  806. cardType: "DC"
  807. }, {
  808. reg: /^(622178|622179|628358)\d{10}$/g,
  809. cardType: "CC"
  810. }]
  811. }, {
  812. bankName: "汉口银行",
  813. bankCode: "HKB",
  814. patterns: [{
  815. reg: /^(990027)\d{12}$/g,
  816. cardType: "DC"
  817. }, {
  818. reg: /^(622325|623105|623029)\d{10}$/g,
  819. cardType: "DC"
  820. }]
  821. }, {
  822. bankName: "盛京银行",
  823. bankCode: "SJBANK",
  824. patterns: [{
  825. reg: /^(566666)\d{12}$/g,
  826. cardType: "DC"
  827. }, {
  828. reg: /^(622455|940039)\d{13}$/g,
  829. cardType: "DC"
  830. }, {
  831. reg: /^(623108|623081)\d{10}$/g,
  832. cardType: "DC"
  833. }, {
  834. reg: /^(622466|628285)\d{10}$/g,
  835. cardType: "CC"
  836. }]
  837. }, {
  838. bankName: "大连银行",
  839. bankCode: "DLB",
  840. patterns: [{
  841. reg: /^(603708)\d{11}$/g,
  842. cardType: "DC"
  843. }, {
  844. reg: /^(622993|623069|623070|623172|623173)\d{13}$/g,
  845. cardType: "DC"
  846. }, {
  847. reg: /^(622383|622385|628299)\d{10}$/g,
  848. cardType: "CC"
  849. }]
  850. }, {
  851. bankName: "河北银行",
  852. bankCode: "BHB",
  853. patterns: [{
  854. reg: /^(622498|622499|623000|940046)\d{13}$/g,
  855. cardType: "DC"
  856. }, {
  857. reg: /^(622921|628321)\d{10}$/g,
  858. cardType: "CC"
  859. }]
  860. }, {
  861. bankName: "乌鲁木齐市商业银行",
  862. bankCode: "URMQCCB",
  863. patterns: [{
  864. reg: /^(621751|622143|940001|621754)\d{13}$/g,
  865. cardType: "DC"
  866. }, {
  867. reg: /^(622476|628278)\d{10}$/g,
  868. cardType: "CC"
  869. }]
  870. }, {
  871. bankName: "绍兴银行",
  872. bankCode: "SXCB",
  873. patterns: [{
  874. reg: /^(622486)\d{10}$/g,
  875. cardType: "DC"
  876. }, {
  877. reg: /^(603602|623026|623086)\d{12}$/g,
  878. cardType: "DC"
  879. }, {
  880. reg: /^(628291)\d{10}$/g,
  881. cardType: "CC"
  882. }]
  883. }, {
  884. bankName: "成都商业银行",
  885. bankCode: "CDCB",
  886. patterns: [{
  887. reg: /^(622152|622154|622996|622997|940027|622153|622135|621482|621532)\d{13}$/g,
  888. cardType: "DC"
  889. }]
  890. }, {
  891. bankName: "抚顺银行",
  892. bankCode: "FSCB",
  893. patterns: [{
  894. reg: /^(622442)\d{11}$/g,
  895. cardType: "DC"
  896. }, {
  897. reg: /^(940053)\d{12}$/g,
  898. cardType: "DC"
  899. }, {
  900. reg: /^(622442|623099)\d{13}$/g,
  901. cardType: "DC"
  902. }]
  903. }, {
  904. bankName: "郑州银行",
  905. bankCode: "ZZBANK",
  906. patterns: [{
  907. reg: /^(622421)\d{13}$/g,
  908. cardType: "DC"
  909. }, {
  910. reg: /^(940056)\d{11}$/g,
  911. cardType: "DC"
  912. }, {
  913. reg: /^(96828)\d{11}$/g,
  914. cardType: "DC"
  915. }]
  916. }, {
  917. bankName: "宁夏银行",
  918. bankCode: "NXBANK",
  919. patterns: [{
  920. reg: /^(621529|622429|621417|623089|623200)\d{13}$/g,
  921. cardType: "DC"
  922. }, {
  923. reg: /^(628214|625529|622428)\d{10}$/g,
  924. cardType: "CC"
  925. }]
  926. }, {
  927. bankName: "重庆银行",
  928. bankCode: "CQBANK",
  929. patterns: [{
  930. reg: /^(9896)\d{12}$/g,
  931. cardType: "DC"
  932. }, {
  933. reg: /^(622134|940018|623016)\d{10}$/g,
  934. cardType: "DC"
  935. }]
  936. }, {
  937. bankName: "哈尔滨银行",
  938. bankCode: "HRBANK",
  939. patterns: [{
  940. reg: /^(621577|622425)\d{13}$/g,
  941. cardType: "DC"
  942. }, {
  943. reg: /^(940049)\d{12}$/g,
  944. cardType: "DC"
  945. }, {
  946. reg: /^(622425)\d{11}$/g,
  947. cardType: "DC"
  948. }]
  949. }, {
  950. bankName: "兰州银行",
  951. bankCode: "LZYH",
  952. patterns: [{
  953. reg: /^(622139|940040|628263)\d{10}$/g,
  954. cardType: "DC"
  955. }, {
  956. reg: /^(621242|621538|621496)\d{13}$/g,
  957. cardType: "DC"
  958. }]
  959. }, {
  960. bankName: "青岛银行",
  961. bankCode: "QDCCB",
  962. patterns: [{
  963. reg: /^(621252|622146|940061|628239)\d{10}$/g,
  964. cardType: "DC"
  965. }, {
  966. reg: /^(621419|623170)\d{13}$/g,
  967. cardType: "DC"
  968. }]
  969. }, {
  970. bankName: "秦皇岛市商业银行",
  971. bankCode: "QHDCCB",
  972. patterns: [{
  973. reg: /^(62249802|94004602)\d{11}$/g,
  974. cardType: "DC"
  975. }, {
  976. reg: /^(621237|623003)\d{13}$/g,
  977. cardType: "DC"
  978. }]
  979. }, {
  980. bankName: "青海银行",
  981. bankCode: "BOQH",
  982. patterns: [{
  983. reg: /^(622310|940068)\d{11}$/g,
  984. cardType: "DC"
  985. }, {
  986. reg: /^(622817|628287|625959)\d{10}$/g,
  987. cardType: "CC"
  988. }, {
  989. reg: /^(62536601)\d{8}$/g,
  990. cardType: "CC"
  991. }]
  992. }, {
  993. bankName: "台州银行",
  994. bankCode: "TZCB",
  995. patterns: [{
  996. reg: /^(622427)\d{10}$/g,
  997. cardType: "DC"
  998. }, {
  999. reg: /^(940069)\d{11}$/g,
  1000. cardType: "DC"
  1001. }, {
  1002. reg: /^(623039)\d{13}$/g,
  1003. cardType: "DC"
  1004. }, {
  1005. reg: /^(622321|628273)\d{10}$/g,
  1006. cardType: "CC"
  1007. }, {
  1008. reg: /^(625001)\d{10}$/g,
  1009. cardType: "SCC"
  1010. }]
  1011. }, {
  1012. bankName: "长沙银行",
  1013. bankCode: "CSCB",
  1014. patterns: [{
  1015. reg: /^(694301)\d{12}$/g,
  1016. cardType: "DC"
  1017. }, {
  1018. reg: /^(940071|622368|621446)\d{13}$/g,
  1019. cardType: "DC"
  1020. }, {
  1021. reg: /^(625901|622898|622900|628281|628282|622806|628283)\d{10}$/g,
  1022. cardType: "CC"
  1023. }, {
  1024. reg: /^(620519)\d{13}$/g,
  1025. cardType: "PC"
  1026. }]
  1027. }, {
  1028. bankName: "泉州银行",
  1029. bankCode: "BOQZ",
  1030. patterns: [{
  1031. reg: /^(683970|940074)\d{12}$/g,
  1032. cardType: "DC"
  1033. }, {
  1034. reg: /^(622370)\d{13}$/g,
  1035. cardType: "DC"
  1036. }, {
  1037. reg: /^(621437)\d{13}$/g,
  1038. cardType: "DC"
  1039. }, {
  1040. reg: /^(628319)\d{10}$/g,
  1041. cardType: "CC"
  1042. }]
  1043. }, {
  1044. bankName: "包商银行",
  1045. bankCode: "BSB",
  1046. patterns: [{
  1047. reg: /^(622336|621760)\d{11}$/g,
  1048. cardType: "DC"
  1049. }, {
  1050. reg: /^(622165)\d{10}$/g,
  1051. cardType: "DC"
  1052. }, {
  1053. reg: /^(622315|625950|628295)\d{10}$/g,
  1054. cardType: "CC"
  1055. }]
  1056. }, {
  1057. bankName: "龙江银行",
  1058. bankCode: "DAQINGB",
  1059. patterns: [{
  1060. reg: /^(621037|621097|621588|622977)\d{13}$/g,
  1061. cardType: "DC"
  1062. }, {
  1063. reg: /^(62321601)\d{11}$/g,
  1064. cardType: "DC"
  1065. }, {
  1066. reg: /^(622860)\d{10}$/g,
  1067. cardType: "DC"
  1068. }, {
  1069. reg: /^(622644|628333)\d{10}$/g,
  1070. cardType: "CC"
  1071. }]
  1072. }, {
  1073. bankName: "上海农商银行",
  1074. bankCode: "SHRCB",
  1075. patterns: [{
  1076. reg: /^(622478|940013|621495)\d{10}$/g,
  1077. cardType: "DC"
  1078. }, {
  1079. reg: /^(625500)\d{10}$/g,
  1080. cardType: "SCC"
  1081. }, {
  1082. reg: /^(622611|622722|628211|625989)\d{10}$/g,
  1083. cardType: "CC"
  1084. }]
  1085. }, {
  1086. bankName: "浙江泰隆商业银行",
  1087. bankCode: "ZJQL",
  1088. patterns: [{
  1089. reg: /^(622717)\d{10}$/g,
  1090. cardType: "SCC"
  1091. }, {
  1092. reg: /^(628275|622565|622287)\d{10}$/g,
  1093. cardType: "CC"
  1094. }]
  1095. }, {
  1096. bankName: "内蒙古银行",
  1097. bankCode: "H3CB",
  1098. patterns: [{
  1099. reg: /^(622147|621633)\d{13}$/g,
  1100. cardType: "DC"
  1101. }, {
  1102. reg: /^(628252)\d{10}$/g,
  1103. cardType: "CC"
  1104. }]
  1105. }, {
  1106. bankName: "广西北部湾银行",
  1107. bankCode: "BGB",
  1108. patterns: [{
  1109. reg: /^(623001)\d{10}$/g,
  1110. cardType: "DC"
  1111. }, {
  1112. reg: /^(628227)\d{10}$/g,
  1113. cardType: "CC"
  1114. }]
  1115. }, {
  1116. bankName: "桂林银行",
  1117. bankCode: "GLBANK",
  1118. patterns: [{
  1119. reg: /^(621456)\d{11}$/g,
  1120. cardType: "DC"
  1121. }, {
  1122. reg: /^(621562)\d{13}$/g,
  1123. cardType: "DC"
  1124. }, {
  1125. reg: /^(628219)\d{10}$/g,
  1126. cardType: "CC"
  1127. }]
  1128. }, {
  1129. bankName: "龙江银行",
  1130. bankCode: "DAQINGB",
  1131. patterns: [{
  1132. reg: /^(621037|621097|621588|622977)\d{13}$/g,
  1133. cardType: "DC"
  1134. }, {
  1135. reg: /^(62321601)\d{11}$/g,
  1136. cardType: "DC"
  1137. }, {
  1138. reg: /^(622475|622860)\d{10}$/g,
  1139. cardType: "DC"
  1140. }, {
  1141. reg: /^(625588)\d{10}$/g,
  1142. cardType: "SCC"
  1143. }, {
  1144. reg: /^(622270|628368|625090|622644|628333)\d{10}$/g,
  1145. cardType: "CC"
  1146. }]
  1147. }, {
  1148. bankName: "成都农村商业银行",
  1149. bankCode: "CDRCB",
  1150. patterns: [{
  1151. reg: /^(623088)\d{13}$/g,
  1152. cardType: "DC"
  1153. }, {
  1154. reg: /^(622829|628301|622808|628308)\d{10}$/g,
  1155. cardType: "CC"
  1156. }]
  1157. }, {
  1158. bankName: "福建省农村信用社联合社",
  1159. bankCode: "FJNX",
  1160. patterns: [{
  1161. reg: /^(622127|622184|621701|621251|621589|623036)\d{13}$/g,
  1162. cardType: "DC"
  1163. }, {
  1164. reg: /^(628232|622802|622290)\d{10}$/g,
  1165. cardType: "CC"
  1166. }]
  1167. }, {
  1168. bankName: "天津农村商业银行",
  1169. bankCode: "TRCB",
  1170. patterns: [{
  1171. reg: /^(622531|622329)\d{13}$/g,
  1172. cardType: "DC"
  1173. }, {
  1174. reg: /^(622829|628301)\d{10}$/g,
  1175. cardType: "CC"
  1176. }]
  1177. }, {
  1178. bankName: "江苏省农村信用社联合社",
  1179. bankCode: "JSRCU",
  1180. patterns: [{
  1181. reg: /^(621578|623066|622452|622324)\d{13}$/g,
  1182. cardType: "DC"
  1183. }, {
  1184. reg: /^(622815|622816|628226)\d{10}$/g,
  1185. cardType: "CC"
  1186. }]
  1187. }, {
  1188. bankName: "湖南农村信用社联合社",
  1189. bankCode: "SLH",
  1190. patterns: [{
  1191. reg: /^(622906|628386|625519|625506)\d{10}$/g,
  1192. cardType: "CC"
  1193. }]
  1194. }, {
  1195. bankName: "江西省农村信用社联合社",
  1196. bankCode: "JXNCX",
  1197. patterns: [{
  1198. reg: /^(621592)\d{10}$/g,
  1199. cardType: "DC"
  1200. }, {
  1201. reg: /^(628392)\d{10}$/g,
  1202. cardType: "CC"
  1203. }]
  1204. }, {
  1205. bankName: "商丘市商业银行",
  1206. bankCode: "SCBBANK",
  1207. patterns: [{
  1208. reg: /^(621748)\d{13}$/g,
  1209. cardType: "DC"
  1210. }, {
  1211. reg: /^(628271)\d{10}$/g,
  1212. cardType: "CC"
  1213. }]
  1214. }, {
  1215. bankName: "华融湘江银行",
  1216. bankCode: "HRXJB",
  1217. patterns: [{
  1218. reg: /^(621366|621388)\d{13}$/g,
  1219. cardType: "DC"
  1220. }, {
  1221. reg: /^(628328)\d{10}$/g,
  1222. cardType: "CC"
  1223. }]
  1224. }, {
  1225. bankName: "衡水市商业银行",
  1226. bankCode: "HSBK",
  1227. patterns: [{
  1228. reg: /^(621239|623068)\d{13}$/g,
  1229. cardType: "DC"
  1230. }]
  1231. }, {
  1232. bankName: "重庆南川石银村镇银行",
  1233. bankCode: "CQNCSYCZ",
  1234. patterns: [{
  1235. reg: /^(621653004)\d{10}$/g,
  1236. cardType: "DC"
  1237. }]
  1238. }, {
  1239. bankName: "湖南省农村信用社联合社",
  1240. bankCode: "HNRCC",
  1241. patterns: [{
  1242. reg: /^(622169|621519|621539|623090)\d{13}$/g,
  1243. cardType: "DC"
  1244. }]
  1245. }, {
  1246. bankName: "邢台银行",
  1247. bankCode: "XTB",
  1248. patterns: [{
  1249. reg: /^(621238|620528)\d{13}$/g,
  1250. cardType: "DC"
  1251. }]
  1252. }, {
  1253. bankName: "临汾市尧都区农村信用合作联社",
  1254. bankCode: "LPRDNCXYS",
  1255. patterns: [{
  1256. reg: /^(628382|625158)\d{10}$/g,
  1257. cardType: "CC"
  1258. }]
  1259. }, {
  1260. bankName: "东营银行",
  1261. bankCode: "DYCCB",
  1262. patterns: [{
  1263. reg: /^(621004)\d{12}$/g,
  1264. cardType: "DC"
  1265. }, {
  1266. reg: /^(628217)\d{10}$/g,
  1267. cardType: "CC"
  1268. }]
  1269. }, {
  1270. bankName: "上饶银行",
  1271. bankCode: "SRBANK",
  1272. patterns: [{
  1273. reg: /^(621416)\d{10}$/g,
  1274. cardType: "DC"
  1275. }, {
  1276. reg: /^(628217)\d{10}$/g,
  1277. cardType: "CC"
  1278. }]
  1279. }, {
  1280. bankName: "德州银行",
  1281. bankCode: "DZBANK",
  1282. patterns: [{
  1283. reg: /^(622937)\d{13}$/g,
  1284. cardType: "DC"
  1285. }, {
  1286. reg: /^(628397)\d{10}$/g,
  1287. cardType: "CC"
  1288. }]
  1289. }, {
  1290. bankName: "承德银行",
  1291. bankCode: "CDB",
  1292. patterns: [{
  1293. reg: /^(628229)\d{10}$/g,
  1294. cardType: "CC"
  1295. }]
  1296. }, {
  1297. bankName: "云南省农村信用社",
  1298. bankCode: "YNRCC",
  1299. patterns: [{
  1300. reg: /^(622469|628307)\d{10}$/g,
  1301. cardType: "CC"
  1302. }]
  1303. }, {
  1304. bankName: "柳州银行",
  1305. bankCode: "LZCCB",
  1306. patterns: [{
  1307. reg: /^(622292|622291|621412)\d{12}$/g,
  1308. cardType: "DC"
  1309. }, {
  1310. reg: /^(622880|622881)\d{10}$/g,
  1311. cardType: "DC"
  1312. }, {
  1313. reg: /^(62829)\d{10}$/g,
  1314. cardType: "CC"
  1315. }]
  1316. }, {
  1317. bankName: "威海市商业银行",
  1318. bankCode: "WHSYBANK",
  1319. patterns: [{
  1320. reg: /^(623102)\d{10}$/g,
  1321. cardType: "DC"
  1322. }, {
  1323. reg: /^(628234)\d{10}$/g,
  1324. cardType: "CC"
  1325. }]
  1326. }, {
  1327. bankName: "湖州银行",
  1328. bankCode: "HZBANK",
  1329. patterns: [{
  1330. reg: /^(628306)\d{10}$/g,
  1331. cardType: "CC"
  1332. }]
  1333. }, {
  1334. bankName: "潍坊银行",
  1335. bankCode: "BANKWF",
  1336. patterns: [{
  1337. reg: /^(622391|940072)\d{10}$/g,
  1338. cardType: "DC"
  1339. }, {
  1340. reg: /^(628391)\d{10}$/g,
  1341. cardType: "CC"
  1342. }]
  1343. }, {
  1344. bankName: "赣州银行",
  1345. bankCode: "GZB",
  1346. patterns: [{
  1347. reg: /^(622967|940073)\d{13}$/g,
  1348. cardType: "DC"
  1349. }, {
  1350. reg: /^(628233)\d{10}$/g,
  1351. cardType: "CC"
  1352. }]
  1353. }, {
  1354. bankName: "日照银行",
  1355. bankCode: "RZGWYBANK",
  1356. patterns: [{
  1357. reg: /^(628257)\d{10}$/g,
  1358. cardType: "CC"
  1359. }]
  1360. }, {
  1361. bankName: "南昌银行",
  1362. bankCode: "NCB",
  1363. patterns: [{
  1364. reg: /^(621269|622275)\d{10}$/g,
  1365. cardType: "DC"
  1366. }, {
  1367. reg: /^(940006)\d{11}$/g,
  1368. cardType: "DC"
  1369. }, {
  1370. reg: /^(628305)\d{11}$/g,
  1371. cardType: "CC"
  1372. }]
  1373. }, {
  1374. bankName: "贵阳银行",
  1375. bankCode: "GYCB",
  1376. patterns: [{
  1377. reg: /^(622133|621735)\d{13}$/g,
  1378. cardType: "DC"
  1379. }, {
  1380. reg: /^(888)\d{13}$/g,
  1381. cardType: "DC"
  1382. }, {
  1383. reg: /^(628213)\d{10}$/g,
  1384. cardType: "CC"
  1385. }]
  1386. }, {
  1387. bankName: "锦州银行",
  1388. bankCode: "BOJZ",
  1389. patterns: [{
  1390. reg: /^(622990|940003)\d{11}$/g,
  1391. cardType: "DC"
  1392. }, {
  1393. reg: /^(628261)\d{10}$/g,
  1394. cardType: "CC"
  1395. }]
  1396. }, {
  1397. bankName: "齐商银行",
  1398. bankCode: "QSBANK",
  1399. patterns: [{
  1400. reg: /^(622311|940057)\d{11}$/g,
  1401. cardType: "DC"
  1402. }, {
  1403. reg: /^(628311)\d{10}$/g,
  1404. cardType: "CC"
  1405. }]
  1406. }, {
  1407. bankName: "珠海华润银行",
  1408. bankCode: "RBOZ",
  1409. patterns: [{
  1410. reg: /^(622363|940048)\d{13}$/g,
  1411. cardType: "DC"
  1412. }, {
  1413. reg: /^(628270)\d{10}$/g,
  1414. cardType: "CC"
  1415. }]
  1416. }, {
  1417. bankName: "葫芦岛市商业银行",
  1418. bankCode: "HLDCCB",
  1419. patterns: [{
  1420. reg: /^(622398|940054)\d{10}$/g,
  1421. cardType: "DC"
  1422. }]
  1423. }, {
  1424. bankName: "宜昌市商业银行",
  1425. bankCode: "HBC",
  1426. patterns: [{
  1427. reg: /^(940055)\d{11}$/g,
  1428. cardType: "DC"
  1429. }, {
  1430. reg: /^(622397)\d{11}$/g,
  1431. cardType: "CC"
  1432. }]
  1433. }, {
  1434. bankName: "杭州商业银行",
  1435. bankCode: "HZCB",
  1436. patterns: [{
  1437. reg: /^(603367|622878)\d{12}$/g,
  1438. cardType: "DC"
  1439. }, {
  1440. reg: /^(622397)\d{11}$/g,
  1441. cardType: "CC"
  1442. }]
  1443. }, {
  1444. bankName: "苏州市商业银行",
  1445. bankCode: "JSBANK",
  1446. patterns: [{
  1447. reg: /^(603506)\d{13}$/g,
  1448. cardType: "DC"
  1449. }]
  1450. }, {
  1451. bankName: "辽阳银行",
  1452. bankCode: "LYCB",
  1453. patterns: [{
  1454. reg: /^(622399|940043)\d{11}$/g,
  1455. cardType: "DC"
  1456. }]
  1457. }, {
  1458. bankName: "洛阳银行",
  1459. bankCode: "LYB",
  1460. patterns: [{
  1461. reg: /^(622420|940041)\d{11}$/g,
  1462. cardType: "DC"
  1463. }]
  1464. }, {
  1465. bankName: "焦作市商业银行",
  1466. bankCode: "JZCBANK",
  1467. patterns: [{
  1468. reg: /^(622338)\d{13}$/g,
  1469. cardType: "DC"
  1470. }, {
  1471. reg: /^(940032)\d{10}$/g,
  1472. cardType: "DC"
  1473. }]
  1474. }, {
  1475. bankName: "镇江市商业银行",
  1476. bankCode: "ZJCCB",
  1477. patterns: [{
  1478. reg: /^(622394|940025)\d{10}$/g,
  1479. cardType: "DC"
  1480. }]
  1481. }, {
  1482. bankName: "法国兴业银行",
  1483. bankCode: "FGXYBANK",
  1484. patterns: [{
  1485. reg: /^(621245)\d{10}$/g,
  1486. cardType: "DC"
  1487. }]
  1488. }, {
  1489. bankName: "大华银行",
  1490. bankCode: "DYBANK",
  1491. patterns: [{
  1492. reg: /^(621328)\d{13}$/g,
  1493. cardType: "DC"
  1494. }]
  1495. }, {
  1496. bankName: "企业银行",
  1497. bankCode: "DIYEBANK",
  1498. patterns: [{
  1499. reg: /^(621651)\d{13}$/g,
  1500. cardType: "DC"
  1501. }]
  1502. }, {
  1503. bankName: "华侨银行",
  1504. bankCode: "HQBANK",
  1505. patterns: [{
  1506. reg: /^(621077)\d{10}$/g,
  1507. cardType: "DC"
  1508. }]
  1509. }, {
  1510. bankName: "恒生银行",
  1511. bankCode: "HSB",
  1512. patterns: [{
  1513. reg: /^(622409|621441)\d{13}$/g,
  1514. cardType: "DC"
  1515. }, {
  1516. reg: /^(622410|621440)\d{11}$/g,
  1517. cardType: "DC"
  1518. }, {
  1519. reg: /^(622950|622951)\d{10}$/g,
  1520. cardType: "DC"
  1521. }, {
  1522. reg: /^(625026|625024|622376|622378|622377|625092)\d{10}$/g,
  1523. cardType: "CC"
  1524. }]
  1525. }, {
  1526. bankName: "临沂商业银行",
  1527. bankCode: "LSB",
  1528. patterns: [{
  1529. reg: /^(622359|940066)\d{13}$/g,
  1530. cardType: "DC"
  1531. }]
  1532. }, {
  1533. bankName: "烟台商业银行",
  1534. bankCode: "YTCB",
  1535. patterns: [{
  1536. reg: /^(622886)\d{10}$/g,
  1537. cardType: "DC"
  1538. }]
  1539. }, {
  1540. bankName: "齐鲁银行",
  1541. bankCode: "QLB",
  1542. patterns: [{
  1543. reg: /^(940008|622379)\d{13}$/g,
  1544. cardType: "DC"
  1545. }, {
  1546. reg: /^(628379)\d{10}$/g,
  1547. cardType: "CC"
  1548. }]
  1549. }, {
  1550. bankName: "BC卡公司",
  1551. bankCode: "BCCC",
  1552. patterns: [{
  1553. reg: /^(620011|620027|620031|620039|620103|620106|620120|620123|620125|620220|620278|620812|621006|621011|621012|621020|621023|621025|621027|621031|620132|621039|621078|621220|621003)\d{10}$/g,
  1554. cardType: "DC"
  1555. }, {
  1556. reg: /^(625003|625011|625012|625020|625023|625025|625027|625031|621032|625039|625078|625079|625103|625106|625006|625112|625120|625123|625125|625127|625131|625032|625139|625178|625179|625220|625320|625111|625132|625244)\d{10}$/g,
  1557. cardType: "CC"
  1558. }]
  1559. }, {
  1560. bankName: "集友银行",
  1561. bankCode: "CYB",
  1562. patterns: [{
  1563. reg: /^(622355|623042)\d{10}$/g,
  1564. cardType: "DC"
  1565. }, {
  1566. reg: /^(621043|621742)\d{13}$/g,
  1567. cardType: "DC"
  1568. }, {
  1569. reg: /^(622352|622353|625048|625053|625060)\d{10}$/g,
  1570. cardType: "CC"
  1571. }, {
  1572. reg: /^(620206|620207)\d{10}$/g,
  1573. cardType: "PC"
  1574. }]
  1575. }, {
  1576. bankName: "大丰银行",
  1577. bankCode: "TFB",
  1578. patterns: [{
  1579. reg: /^(622547|622548|622546)\d{13}$/g,
  1580. cardType: "DC"
  1581. }, {
  1582. reg: /^(625198|625196|625147)\d{10}$/g,
  1583. cardType: "CC"
  1584. }, {
  1585. reg: /^(620072)\d{13}$/g,
  1586. cardType: "PC"
  1587. }, {
  1588. reg: /^(620204|620205)\d{10}$/g,
  1589. cardType: "PC"
  1590. }]
  1591. }, {
  1592. bankName: "AEON信贷财务亚洲有限公司",
  1593. bankCode: "AEON",
  1594. patterns: [{
  1595. reg: /^(621064|622941|622974)\d{10}$/g,
  1596. cardType: "DC"
  1597. }, {
  1598. reg: /^(622493)\d{10}$/g,
  1599. cardType: "CC"
  1600. }]
  1601. }, {
  1602. bankName: "澳门BDA",
  1603. bankCode: "MABDA",
  1604. patterns: [{
  1605. reg: /^(621274|621324)\d{13}$/g,
  1606. cardType: "DC"
  1607. }]
  1608. }]
  1609. function getBankNameByBankCode(bankcode) {
  1610. for (var i = 0, len = bankcardList.length; i < len; i++) {
  1611. var bankcard = bankcardList[i];
  1612. if (bankcode == bankcard.bankCode) {
  1613. return bankcard.bankName;
  1614. }
  1615. }
  1616. return "";
  1617. }
  1618. function _getBankInfoByCardNo(cardNo) {
  1619. for (var i = 0, len = bankcardList.length; i < len; i++) {
  1620. var bankcard = bankcardList[i];
  1621. var patterns = bankcard.patterns;
  1622. for (var j = 0, jLen = patterns.length; j < jLen; j++) {
  1623. var pattern = patterns[j];
  1624. if ((new RegExp(pattern.reg)).test(cardNo)) {
  1625. var info = extend(bankcard, pattern);
  1626. delete info.patterns;
  1627. delete info.reg;
  1628. info['cardTypeName'] = getCardTypeName(info['cardType']);
  1629. return info;//返回银行卡结果
  1630. }
  1631. }
  1632. }
  1633. return 'error';
  1634. }
  1635. return _getBankInfoByCardNo(bankCard)
  1636. }
  1637. })