phone-international-input.js 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const common_assets = require("../../../../common/assets.js");
  4. require("../../../index.js");
  5. const sheep_hooks_useModal = require("../../../hooks/useModal.js");
  6. require("../../../api/index.js");
  7. require("../../../api/distri/score.js");
  8. require("../../../request/index.js");
  9. require("../../../config/index.js");
  10. require("../../../store/index.js");
  11. require("../../../store/app.js");
  12. require("../../../api/promotion/diy.js");
  13. require("../../../platform/index.js");
  14. require("../../../platform/provider/wechat/index.js");
  15. require("../../../platform/provider/wechat/miniProgram.js");
  16. require("../../../api/member/auth.js");
  17. require("../../../api/member/social.js");
  18. require("../../../api/member/user.js");
  19. require("../../../platform/provider/apple/index.js");
  20. require("../../../platform/share.js");
  21. require("../../../router/index.js");
  22. require("../../../helper/throttle.js");
  23. require("../../../url/index.js");
  24. require("../../../platform/pay.js");
  25. require("../../../helper/index.js");
  26. require("../../../helper/test.js");
  27. require("../../../helper/digit.js");
  28. require("../../../api/pay/order.js");
  29. require("../../../store/user.js");
  30. require("../../../store/cart.js");
  31. require("../../../api/trade/cart.js");
  32. require("../../../api/pay/wallet.js");
  33. require("../../../api/trade/order.js");
  34. require("../../../api/promotion/coupon.js");
  35. require("../../../store/sys.js");
  36. require("../../../store/modal.js");
  37. require("../../../api/distri/share.js");
  38. require("../../../api/distri/team.js");
  39. require("../../../api/infra/file.js");
  40. require("../../../api/member/address.js");
  41. require("../../../api/member/point.js");
  42. require("../../../api/member/signin.js");
  43. require("../../../api/migration/app.js");
  44. require("../../../api/migration/chat.js");
  45. require("../../../api/migration/index.js");
  46. require("../../../api/migration/third.js");
  47. require("../../../api/pay/channel.js");
  48. require("../../../api/product/category.js");
  49. require("../../../api/product/comment.js");
  50. require("../../../api/product/favorite.js");
  51. require("../../../api/product/history.js");
  52. require("../../../api/product/spu.js");
  53. require("../../../api/promotion/activity.js");
  54. require("../../../api/promotion/article.js");
  55. require("../../../api/promotion/bargain.js");
  56. require("../../../api/promotion/combination.js");
  57. require("../../../api/promotion/rewardActivity.js");
  58. require("../../../api/promotion/seckill.js");
  59. require("../../../api/system/area.js");
  60. require("../../../api/system/voice.js");
  61. require("../../../api/trade/afterSale.js");
  62. require("../../../api/trade/brokerage.js");
  63. require("../../../api/trade/config.js");
  64. require("../../../api/trade/delivery.js");
  65. require("../../../config/zIndex.js");
  66. const countryData = [
  67. {
  68. english_name: "China",
  69. chinese_name: "中国",
  70. country_code: "CN",
  71. phone_code: "86"
  72. },
  73. {
  74. english_name: "Hong Kong",
  75. chinese_name: "中国香港",
  76. country_code: "HK",
  77. phone_code: "852"
  78. },
  79. {
  80. english_name: "Taiwan",
  81. chinese_name: "中国台湾",
  82. country_code: "TW",
  83. phone_code: "886"
  84. },
  85. {
  86. english_name: "Macau",
  87. chinese_name: "中国澳门",
  88. country_code: "MO",
  89. phone_code: "853"
  90. },
  91. {
  92. english_name: "Central African Republic",
  93. chinese_name: "中非共和国",
  94. country_code: "CF",
  95. phone_code: "236"
  96. },
  97. {
  98. english_name: "Chile",
  99. chinese_name: "智利",
  100. country_code: "CL",
  101. phone_code: "56"
  102. },
  103. {
  104. english_name: "Gibraltar",
  105. chinese_name: "直布罗陀",
  106. country_code: "GI",
  107. phone_code: "350"
  108. },
  109. {
  110. english_name: "Chad",
  111. chinese_name: "乍得",
  112. country_code: "TD",
  113. phone_code: "235"
  114. },
  115. {
  116. english_name: "Zambia",
  117. chinese_name: "赞比亚",
  118. country_code: "ZM",
  119. phone_code: "260"
  120. },
  121. {
  122. english_name: "Vietnam",
  123. chinese_name: "越南",
  124. country_code: "VN",
  125. phone_code: "84"
  126. },
  127. {
  128. english_name: "Jordan",
  129. chinese_name: "约旦",
  130. country_code: "JO",
  131. phone_code: "962"
  132. },
  133. {
  134. english_name: "Virgin Islands, British",
  135. chinese_name: "英属处女群岛",
  136. country_code: "VG",
  137. phone_code: "1340"
  138. },
  139. {
  140. english_name: "United Kingdom",
  141. chinese_name: "英国",
  142. country_code: "GB",
  143. phone_code: "44"
  144. },
  145. {
  146. english_name: "Indonesia",
  147. chinese_name: "印度尼西亚",
  148. country_code: "ID",
  149. phone_code: "62"
  150. },
  151. {
  152. english_name: "India",
  153. chinese_name: "印度",
  154. country_code: "IN",
  155. phone_code: "91"
  156. },
  157. {
  158. english_name: "Italy",
  159. chinese_name: "意大利",
  160. country_code: "IT",
  161. phone_code: "39"
  162. },
  163. {
  164. english_name: "Israel",
  165. chinese_name: "以色列",
  166. country_code: "IL",
  167. phone_code: "972"
  168. },
  169. {
  170. english_name: "Iran",
  171. chinese_name: "伊朗",
  172. country_code: "IR",
  173. phone_code: "98"
  174. },
  175. {
  176. english_name: "Iraq",
  177. chinese_name: "伊拉克",
  178. country_code: "IQ",
  179. phone_code: "964"
  180. },
  181. {
  182. english_name: "Yemen",
  183. chinese_name: "也门",
  184. country_code: "YE",
  185. phone_code: "967"
  186. },
  187. {
  188. english_name: "Armenia",
  189. chinese_name: "亚美尼亚",
  190. country_code: "AM",
  191. phone_code: "374"
  192. },
  193. {
  194. english_name: "Jamaica",
  195. chinese_name: "牙买加",
  196. country_code: "JM",
  197. phone_code: "1876"
  198. },
  199. {
  200. english_name: "Syria",
  201. chinese_name: "叙利亚",
  202. country_code: "SY",
  203. phone_code: "963"
  204. },
  205. {
  206. english_name: "Hungary",
  207. chinese_name: "匈牙利",
  208. country_code: "HU",
  209. phone_code: "36"
  210. },
  211. {
  212. english_name: "New Zealand",
  213. chinese_name: "新西兰",
  214. country_code: "NZ",
  215. phone_code: "64"
  216. },
  217. {
  218. english_name: "New Caledonia",
  219. chinese_name: "新喀里多尼亚",
  220. country_code: "NC",
  221. phone_code: "687"
  222. },
  223. {
  224. english_name: "Singapore",
  225. chinese_name: "新加坡",
  226. country_code: "SG",
  227. phone_code: "65"
  228. },
  229. {
  230. english_name: "Ivory Coast",
  231. chinese_name: "象牙海岸",
  232. country_code: "CI",
  233. phone_code: "225"
  234. },
  235. {
  236. english_name: "Greece",
  237. chinese_name: "希腊",
  238. country_code: "GR",
  239. phone_code: "30"
  240. },
  241. {
  242. english_name: "Spain",
  243. chinese_name: "西班牙",
  244. country_code: "ES",
  245. phone_code: "34"
  246. },
  247. {
  248. english_name: "Uzbekistan",
  249. chinese_name: "乌兹别克斯坦",
  250. country_code: "UZ",
  251. phone_code: "998"
  252. },
  253. {
  254. english_name: "Uruguay",
  255. chinese_name: "乌拉圭",
  256. country_code: "UY",
  257. phone_code: "598"
  258. },
  259. {
  260. english_name: "Ukraine",
  261. chinese_name: "乌克兰",
  262. country_code: "UA",
  263. phone_code: "380"
  264. },
  265. {
  266. english_name: "Uganda",
  267. chinese_name: "乌干达",
  268. country_code: "UG",
  269. phone_code: "256"
  270. },
  271. {
  272. english_name: "Brunei",
  273. chinese_name: "文莱",
  274. country_code: "BN",
  275. phone_code: "673"
  276. },
  277. {
  278. english_name: "Venezuela",
  279. chinese_name: "委内瑞拉",
  280. country_code: "VE",
  281. phone_code: "58"
  282. },
  283. {
  284. english_name: "Vanuatu",
  285. chinese_name: "瓦努阿图",
  286. country_code: "VU",
  287. phone_code: "678"
  288. },
  289. {
  290. english_name: "Turkmenistan",
  291. chinese_name: "土库曼斯坦",
  292. country_code: "TM",
  293. phone_code: "993"
  294. },
  295. {
  296. english_name: "Turkey",
  297. chinese_name: "土耳其",
  298. country_code: "TR",
  299. phone_code: "90"
  300. },
  301. {
  302. english_name: "Tunisia",
  303. chinese_name: "突尼斯",
  304. country_code: "TN",
  305. phone_code: "216"
  306. },
  307. {
  308. english_name: "Trinidad and Tobago",
  309. chinese_name: "特立尼达和多巴哥",
  310. country_code: "TT",
  311. phone_code: "1868"
  312. },
  313. {
  314. english_name: "Turks and Caicos Islands",
  315. chinese_name: "特克斯和凯科斯群岛",
  316. country_code: "TC",
  317. phone_code: "1649"
  318. },
  319. {
  320. english_name: "Tonga",
  321. chinese_name: "汤加",
  322. country_code: "TO",
  323. phone_code: "676"
  324. },
  325. {
  326. english_name: "Tanzania",
  327. chinese_name: "坦桑尼亚",
  328. country_code: "TZ",
  329. phone_code: "255"
  330. },
  331. {
  332. english_name: "Thailand",
  333. chinese_name: "泰国",
  334. country_code: "TH",
  335. phone_code: "66"
  336. },
  337. {
  338. english_name: "Tajikistan",
  339. chinese_name: "塔吉克斯坦",
  340. country_code: "TJ",
  341. phone_code: "992"
  342. },
  343. {
  344. english_name: "Somalia",
  345. chinese_name: "索马里",
  346. country_code: "SO",
  347. phone_code: "252"
  348. },
  349. {
  350. english_name: "Solomon Islands",
  351. chinese_name: "所罗门群岛",
  352. country_code: "SB",
  353. phone_code: "677"
  354. },
  355. {
  356. english_name: "Suriname",
  357. chinese_name: "苏里南",
  358. country_code: "SR",
  359. phone_code: "597"
  360. },
  361. {
  362. english_name: "Sudan",
  363. chinese_name: "苏丹",
  364. country_code: "SD",
  365. phone_code: "249"
  366. },
  367. {
  368. english_name: "Swaziland",
  369. chinese_name: "斯威士兰",
  370. country_code: "SZ",
  371. phone_code: "268"
  372. },
  373. {
  374. english_name: "Slovenia",
  375. chinese_name: "斯洛文尼亚",
  376. country_code: "SI",
  377. phone_code: "386"
  378. },
  379. {
  380. english_name: "Slovakia",
  381. chinese_name: "斯洛伐克",
  382. country_code: "SK",
  383. phone_code: "421"
  384. },
  385. {
  386. english_name: "Sri Lanka",
  387. chinese_name: "斯里兰卡",
  388. country_code: "LK",
  389. phone_code: "94"
  390. },
  391. {
  392. english_name: "Saint Vincent and The Grenadines",
  393. chinese_name: "圣文森特和格林纳丁斯",
  394. country_code: "VC",
  395. phone_code: "1784"
  396. },
  397. {
  398. english_name: "San Marino",
  399. chinese_name: "圣马力诺",
  400. country_code: "SM",
  401. phone_code: "378"
  402. },
  403. {
  404. english_name: "Saint Maarten (Dutch Part)",
  405. chinese_name: "圣马丁岛(荷兰部分)",
  406. country_code: "SX",
  407. phone_code: "1721"
  408. },
  409. {
  410. english_name: "Saint Lucia",
  411. chinese_name: "圣露西亚",
  412. country_code: "LC",
  413. phone_code: "1758"
  414. },
  415. {
  416. english_name: "Saint Kitts and Nevis",
  417. chinese_name: "圣基茨和尼维斯",
  418. country_code: "KN",
  419. phone_code: "1869"
  420. },
  421. {
  422. english_name: "Sao Tome and Principe",
  423. chinese_name: "圣多美和普林西比",
  424. country_code: "ST",
  425. phone_code: "239"
  426. },
  427. {
  428. english_name: "Saint Pierre and Miquelon",
  429. chinese_name: "圣彼埃尔和密克隆岛",
  430. country_code: "PM",
  431. phone_code: "508"
  432. },
  433. {
  434. english_name: "Saudi Arabia",
  435. chinese_name: "沙特阿拉伯",
  436. country_code: "SA",
  437. phone_code: "966"
  438. },
  439. {
  440. english_name: "Seychelles",
  441. chinese_name: "塞舌尔",
  442. country_code: "SC",
  443. phone_code: "248"
  444. },
  445. {
  446. english_name: "Cyprus",
  447. chinese_name: "塞浦路斯",
  448. country_code: "CY",
  449. phone_code: "357"
  450. },
  451. {
  452. english_name: "Senegal",
  453. chinese_name: "塞内加尔",
  454. country_code: "SN",
  455. phone_code: "221"
  456. },
  457. {
  458. english_name: "Sierra Leone",
  459. chinese_name: "塞拉利昂",
  460. country_code: "SL",
  461. phone_code: "232"
  462. },
  463. {
  464. english_name: "Serbia",
  465. chinese_name: "塞尔维亚",
  466. country_code: "RS",
  467. phone_code: "381"
  468. },
  469. {
  470. english_name: "Samoa",
  471. chinese_name: "萨摩亚",
  472. country_code: "WS",
  473. phone_code: "685"
  474. },
  475. {
  476. english_name: "El Salvador",
  477. chinese_name: "萨尔瓦多",
  478. country_code: "SV",
  479. phone_code: "503"
  480. },
  481. {
  482. english_name: "Switzerland",
  483. chinese_name: "瑞士",
  484. country_code: "CH",
  485. phone_code: "41"
  486. },
  487. {
  488. english_name: "Sweden",
  489. chinese_name: "瑞典",
  490. country_code: "SE",
  491. phone_code: "46"
  492. },
  493. {
  494. english_name: "Japan",
  495. chinese_name: "日本",
  496. country_code: "JP",
  497. phone_code: "81"
  498. },
  499. {
  500. english_name: "Portugal",
  501. chinese_name: "葡萄牙",
  502. country_code: "PT",
  503. phone_code: "351"
  504. },
  505. {
  506. english_name: "Palau",
  507. chinese_name: "帕劳",
  508. country_code: "PW",
  509. phone_code: "680"
  510. },
  511. {
  512. english_name: "Norway",
  513. chinese_name: "挪威",
  514. country_code: "NO",
  515. phone_code: "47"
  516. },
  517. {
  518. english_name: "Nigeria",
  519. chinese_name: "尼日利亚",
  520. country_code: "NG",
  521. phone_code: "234"
  522. },
  523. {
  524. english_name: "Niger",
  525. chinese_name: "尼日尔",
  526. country_code: "NE",
  527. phone_code: "227"
  528. },
  529. {
  530. english_name: "Nepal",
  531. chinese_name: "尼泊尔",
  532. country_code: "NP",
  533. phone_code: "977"
  534. },
  535. {
  536. english_name: "Nicaragua",
  537. chinese_name: "尼加拉瓜",
  538. country_code: "NI",
  539. phone_code: "505"
  540. },
  541. {
  542. english_name: "South Africa",
  543. chinese_name: "南非",
  544. country_code: "ZA",
  545. phone_code: "27"
  546. },
  547. {
  548. english_name: "Namibia",
  549. chinese_name: "纳米比亚",
  550. country_code: "NA",
  551. phone_code: "264"
  552. },
  553. {
  554. english_name: "Mexico",
  555. chinese_name: "墨西哥",
  556. country_code: "MX",
  557. phone_code: "52"
  558. },
  559. {
  560. english_name: "Mozambique",
  561. chinese_name: "莫桑比克",
  562. country_code: "MZ",
  563. phone_code: "258"
  564. },
  565. {
  566. english_name: "Monaco",
  567. chinese_name: "摩纳哥",
  568. country_code: "MC",
  569. phone_code: "377"
  570. },
  571. {
  572. english_name: "Morocco",
  573. chinese_name: "摩洛哥",
  574. country_code: "MA",
  575. phone_code: "212"
  576. },
  577. {
  578. english_name: "Moldova",
  579. chinese_name: "摩尔多瓦",
  580. country_code: "MD",
  581. phone_code: "373"
  582. },
  583. {
  584. english_name: "Myanmar",
  585. chinese_name: "缅甸",
  586. country_code: "MM",
  587. phone_code: "95"
  588. },
  589. {
  590. english_name: "Peru",
  591. chinese_name: "秘鲁",
  592. country_code: "PE",
  593. phone_code: "51"
  594. },
  595. {
  596. english_name: "Bangladesh",
  597. chinese_name: "孟加拉国",
  598. country_code: "BD",
  599. phone_code: "880"
  600. },
  601. {
  602. english_name: "Montserrat",
  603. chinese_name: "蒙特塞拉特岛",
  604. country_code: "MS",
  605. phone_code: "1664"
  606. },
  607. {
  608. english_name: "Mongolia",
  609. chinese_name: "蒙古",
  610. country_code: "MN",
  611. phone_code: "976"
  612. },
  613. {
  614. english_name: "Virgin Islands, US",
  615. chinese_name: "美属维尔京群岛",
  616. country_code: "VI",
  617. phone_code: "1284"
  618. },
  619. {
  620. english_name: "American Samoa",
  621. chinese_name: "美属萨摩亚",
  622. country_code: "AS",
  623. phone_code: "1684"
  624. },
  625. {
  626. english_name: "United States",
  627. chinese_name: "美国",
  628. country_code: "US",
  629. phone_code: "1"
  630. },
  631. {
  632. english_name: "Mauritania",
  633. chinese_name: "毛里塔尼亚",
  634. country_code: "MR",
  635. phone_code: "222"
  636. },
  637. {
  638. english_name: "Mauritius",
  639. chinese_name: "毛里求斯",
  640. country_code: "MU",
  641. phone_code: "230"
  642. },
  643. {
  644. english_name: "Mayotte",
  645. chinese_name: "马约特",
  646. country_code: "YT",
  647. phone_code: "269"
  648. },
  649. {
  650. english_name: "Martinique",
  651. chinese_name: "马提尼克",
  652. country_code: "MQ",
  653. phone_code: "596"
  654. },
  655. {
  656. english_name: "Macedonia",
  657. chinese_name: "马其顿",
  658. country_code: "MK",
  659. phone_code: "389"
  660. },
  661. {
  662. english_name: "Mali",
  663. chinese_name: "马里",
  664. country_code: "ML",
  665. phone_code: "223"
  666. },
  667. {
  668. english_name: "Malaysia",
  669. chinese_name: "马来西亚",
  670. country_code: "MY",
  671. phone_code: "60"
  672. },
  673. {
  674. english_name: "Malawi",
  675. chinese_name: "马拉维",
  676. country_code: "MW",
  677. phone_code: "265"
  678. },
  679. {
  680. english_name: "Malta",
  681. chinese_name: "马耳他",
  682. country_code: "MT",
  683. phone_code: "356"
  684. },
  685. {
  686. english_name: "Maldives",
  687. chinese_name: "马尔代夫",
  688. country_code: "MV",
  689. phone_code: "960"
  690. },
  691. {
  692. english_name: "Madagascar",
  693. chinese_name: "马达加斯加",
  694. country_code: "MG",
  695. phone_code: "261"
  696. },
  697. {
  698. english_name: "Romania",
  699. chinese_name: "罗马尼亚",
  700. country_code: "RO",
  701. phone_code: "40"
  702. },
  703. {
  704. english_name: "Rwanda",
  705. chinese_name: "卢旺达",
  706. country_code: "RW",
  707. phone_code: "250"
  708. },
  709. {
  710. english_name: "Luxembourg",
  711. chinese_name: "卢森堡",
  712. country_code: "LU",
  713. phone_code: "352"
  714. },
  715. {
  716. english_name: "Réunion Island",
  717. chinese_name: "留尼汪",
  718. country_code: "RE",
  719. phone_code: "262"
  720. },
  721. {
  722. english_name: "Liechtenstein",
  723. chinese_name: "列支敦士登",
  724. country_code: "LI",
  725. phone_code: "423"
  726. },
  727. {
  728. english_name: "Libya",
  729. chinese_name: "利比亚",
  730. country_code: "LY",
  731. phone_code: "218"
  732. },
  733. {
  734. english_name: "Liberia",
  735. chinese_name: "利比里亚",
  736. country_code: "LR",
  737. phone_code: "231"
  738. },
  739. {
  740. english_name: "Lithuania",
  741. chinese_name: "立陶宛",
  742. country_code: "LT",
  743. phone_code: "370"
  744. },
  745. {
  746. english_name: "Lebanon",
  747. chinese_name: "黎巴嫩",
  748. country_code: "LB",
  749. phone_code: "961"
  750. },
  751. {
  752. english_name: "Laos",
  753. chinese_name: "老挝",
  754. country_code: "LA",
  755. phone_code: "856"
  756. },
  757. {
  758. english_name: "Lesotho",
  759. chinese_name: "莱索托",
  760. country_code: "LS",
  761. phone_code: "266"
  762. },
  763. {
  764. english_name: "Latvia",
  765. chinese_name: "拉脱维亚",
  766. country_code: "LV",
  767. phone_code: "371"
  768. },
  769. {
  770. english_name: "Curacao",
  771. chinese_name: "库拉索",
  772. country_code: "CW",
  773. phone_code: "599"
  774. },
  775. {
  776. english_name: "Cook Islands",
  777. chinese_name: "库克群岛",
  778. country_code: "CK",
  779. phone_code: "682"
  780. },
  781. {
  782. english_name: "Kenya",
  783. chinese_name: "肯尼亚",
  784. country_code: "KE",
  785. phone_code: "254"
  786. },
  787. {
  788. english_name: "Croatia",
  789. chinese_name: "克罗地亚",
  790. country_code: "HR",
  791. phone_code: "385"
  792. },
  793. {
  794. english_name: "Kuwait",
  795. chinese_name: "科威特",
  796. country_code: "KW",
  797. phone_code: "965"
  798. },
  799. {
  800. english_name: "Comoros",
  801. chinese_name: "科摩罗",
  802. country_code: "KM",
  803. phone_code: "269"
  804. },
  805. {
  806. english_name: "Cape Verde",
  807. chinese_name: "开普",
  808. country_code: "CV",
  809. phone_code: "238"
  810. },
  811. {
  812. english_name: "Cayman Islands",
  813. chinese_name: "开曼群岛",
  814. country_code: "KY",
  815. phone_code: "1345"
  816. },
  817. {
  818. english_name: "Qatar",
  819. chinese_name: "卡塔尔",
  820. country_code: "QA",
  821. phone_code: "974"
  822. },
  823. {
  824. english_name: "Cameroon",
  825. chinese_name: "喀麦隆",
  826. country_code: "CM",
  827. phone_code: "237"
  828. },
  829. {
  830. english_name: "Zimbabwe",
  831. chinese_name: "津巴布韦",
  832. country_code: "ZW",
  833. phone_code: "263"
  834. },
  835. {
  836. english_name: "Czech",
  837. chinese_name: "捷克",
  838. country_code: "CZ",
  839. phone_code: "420"
  840. },
  841. {
  842. english_name: "Cambodia",
  843. chinese_name: "柬埔寨",
  844. country_code: "KH",
  845. phone_code: "855"
  846. },
  847. {
  848. english_name: "Gabon",
  849. chinese_name: "加蓬",
  850. country_code: "GA",
  851. phone_code: "241"
  852. },
  853. {
  854. english_name: "Ghana",
  855. chinese_name: "加纳",
  856. country_code: "GH",
  857. phone_code: "233"
  858. },
  859. {
  860. english_name: "Canada",
  861. chinese_name: "加拿大",
  862. country_code: "CA",
  863. phone_code: "1"
  864. },
  865. {
  866. english_name: "Guinea-Bissau",
  867. chinese_name: "几内亚比绍共和国",
  868. country_code: "GW",
  869. phone_code: "245"
  870. },
  871. {
  872. english_name: "Guinea",
  873. chinese_name: "几内亚",
  874. country_code: "GN",
  875. phone_code: "224"
  876. },
  877. {
  878. english_name: "Kyrgyzstan",
  879. chinese_name: "吉尔吉斯斯坦",
  880. country_code: "KG",
  881. phone_code: "996"
  882. },
  883. {
  884. english_name: "Djibouti",
  885. chinese_name: "吉布提",
  886. country_code: "DJ",
  887. phone_code: "253"
  888. },
  889. {
  890. english_name: "Kiribati",
  891. chinese_name: "基里巴斯",
  892. country_code: "KI",
  893. phone_code: "686"
  894. },
  895. {
  896. english_name: "Honduras",
  897. chinese_name: "洪都拉斯",
  898. country_code: "HN",
  899. phone_code: "504"
  900. },
  901. {
  902. english_name: "Montenegro",
  903. chinese_name: "黑山",
  904. country_code: "ME",
  905. phone_code: "382"
  906. },
  907. {
  908. english_name: "Netherlands",
  909. chinese_name: "荷兰",
  910. country_code: "NL",
  911. phone_code: "31"
  912. },
  913. {
  914. english_name: "South Korea",
  915. chinese_name: "韩国",
  916. country_code: "KR",
  917. phone_code: "82"
  918. },
  919. {
  920. english_name: "Haiti",
  921. chinese_name: "海地",
  922. country_code: "HT",
  923. phone_code: "509"
  924. },
  925. {
  926. english_name: "Kazakhstan",
  927. chinese_name: "哈萨克斯坦",
  928. country_code: "KZ",
  929. phone_code: "7"
  930. },
  931. {
  932. english_name: "Guyana",
  933. chinese_name: "圭亚那",
  934. country_code: "GY",
  935. phone_code: "592"
  936. },
  937. {
  938. english_name: "Guam",
  939. chinese_name: "关岛",
  940. country_code: "GU",
  941. phone_code: "1671"
  942. },
  943. {
  944. english_name: "Guatemala",
  945. chinese_name: "瓜地马拉",
  946. country_code: "GT",
  947. phone_code: "502"
  948. },
  949. {
  950. english_name: "Guadeloupe",
  951. chinese_name: "瓜德罗普岛",
  952. country_code: "GP",
  953. phone_code: "590"
  954. },
  955. {
  956. english_name: "Cuba",
  957. chinese_name: "古巴",
  958. country_code: "CU",
  959. phone_code: "53"
  960. },
  961. {
  962. english_name: "Georgia",
  963. chinese_name: "格鲁吉亚",
  964. country_code: "GE",
  965. phone_code: "995"
  966. },
  967. {
  968. english_name: "Greenland",
  969. chinese_name: "格陵兰岛",
  970. country_code: "GL",
  971. phone_code: "299"
  972. },
  973. {
  974. english_name: "Grenada",
  975. chinese_name: "格林纳达",
  976. country_code: "GD",
  977. phone_code: "1473"
  978. },
  979. {
  980. english_name: "Costa Rica",
  981. chinese_name: "哥斯达黎加",
  982. country_code: "CR",
  983. phone_code: "506"
  984. },
  985. {
  986. english_name: "Colombia",
  987. chinese_name: "哥伦比亚",
  988. country_code: "CO",
  989. phone_code: "57"
  990. },
  991. {
  992. english_name: "Democratic Republic of the Congo",
  993. chinese_name: "刚果民主共和国",
  994. country_code: "CD",
  995. phone_code: "243"
  996. },
  997. {
  998. english_name: "Republic Of The Congo",
  999. chinese_name: "刚果共和国",
  1000. country_code: "CG",
  1001. phone_code: "242"
  1002. },
  1003. {
  1004. english_name: "Gambia",
  1005. chinese_name: "冈比亚",
  1006. country_code: "GM",
  1007. phone_code: "220"
  1008. },
  1009. {
  1010. english_name: "Finland",
  1011. chinese_name: "芬兰",
  1012. country_code: "FI",
  1013. phone_code: "358"
  1014. },
  1015. {
  1016. english_name: "Fiji",
  1017. chinese_name: "斐济",
  1018. country_code: "FJ",
  1019. phone_code: "679"
  1020. },
  1021. {
  1022. english_name: "Philippines",
  1023. chinese_name: "菲律宾",
  1024. country_code: "PH",
  1025. phone_code: "63"
  1026. },
  1027. {
  1028. english_name: "French Guiana",
  1029. chinese_name: "法属圭亚那",
  1030. country_code: "GF",
  1031. phone_code: "594"
  1032. },
  1033. {
  1034. english_name: "French Polynesia",
  1035. chinese_name: "法属波利尼西亚",
  1036. country_code: "PF",
  1037. phone_code: "689"
  1038. },
  1039. {
  1040. english_name: "Faroe Islands",
  1041. chinese_name: "法罗群岛",
  1042. country_code: "FO",
  1043. phone_code: "298"
  1044. },
  1045. {
  1046. english_name: "France",
  1047. chinese_name: "法国",
  1048. country_code: "FR",
  1049. phone_code: "33"
  1050. },
  1051. {
  1052. english_name: "Eritrea",
  1053. chinese_name: "厄立特里亚",
  1054. country_code: "ER",
  1055. phone_code: "291"
  1056. },
  1057. {
  1058. english_name: "Ecuador",
  1059. chinese_name: "厄瓜多尔",
  1060. country_code: "EC",
  1061. phone_code: "593"
  1062. },
  1063. {
  1064. english_name: "Russia",
  1065. chinese_name: "俄罗斯",
  1066. country_code: "RU",
  1067. phone_code: "7"
  1068. },
  1069. {
  1070. english_name: "Dominican Republic",
  1071. chinese_name: "多米尼加共和国",
  1072. country_code: "DO",
  1073. phone_code: "1809"
  1074. },
  1075. {
  1076. english_name: "Dominica",
  1077. chinese_name: "多米尼加",
  1078. country_code: "DM",
  1079. phone_code: "1767"
  1080. },
  1081. {
  1082. english_name: "Togo",
  1083. chinese_name: "多哥",
  1084. country_code: "TG",
  1085. phone_code: "228"
  1086. },
  1087. {
  1088. english_name: "Timor-Leste",
  1089. chinese_name: "东帝汶",
  1090. country_code: "TL",
  1091. phone_code: "670"
  1092. },
  1093. {
  1094. english_name: "Germany",
  1095. chinese_name: "德国",
  1096. country_code: "DE",
  1097. phone_code: "49"
  1098. },
  1099. {
  1100. english_name: "Denmark",
  1101. chinese_name: "丹麦",
  1102. country_code: "DK",
  1103. phone_code: "45"
  1104. },
  1105. {
  1106. english_name: "Equatorial Guinea",
  1107. chinese_name: "赤道几内亚",
  1108. country_code: "GQ",
  1109. phone_code: "240"
  1110. },
  1111. {
  1112. english_name: "Burundi",
  1113. chinese_name: "布隆迪",
  1114. country_code: "BI",
  1115. phone_code: "257"
  1116. },
  1117. {
  1118. english_name: "Burkina Faso",
  1119. chinese_name: "布基纳法索",
  1120. country_code: "BF",
  1121. phone_code: "226"
  1122. },
  1123. {
  1124. english_name: "Bhutan",
  1125. chinese_name: "不丹",
  1126. country_code: "BT",
  1127. phone_code: "975"
  1128. },
  1129. {
  1130. english_name: "Botswana",
  1131. chinese_name: "博茨瓦纳",
  1132. country_code: "BW",
  1133. phone_code: "267"
  1134. },
  1135. {
  1136. english_name: "Belize",
  1137. chinese_name: "伯利兹",
  1138. country_code: "BZ",
  1139. phone_code: "501"
  1140. },
  1141. {
  1142. english_name: "Bolivia",
  1143. chinese_name: "玻利维亚",
  1144. country_code: "BO",
  1145. phone_code: "591"
  1146. },
  1147. {
  1148. english_name: "Bosnia and Herzegovina",
  1149. chinese_name: "波斯尼亚和黑塞哥维那",
  1150. country_code: "BA",
  1151. phone_code: "387"
  1152. },
  1153. {
  1154. english_name: "Poland",
  1155. chinese_name: "波兰",
  1156. country_code: "PL",
  1157. phone_code: "48"
  1158. },
  1159. {
  1160. english_name: "Puerto Rico",
  1161. chinese_name: "波多黎各",
  1162. country_code: "PR",
  1163. phone_code: "1787"
  1164. },
  1165. {
  1166. english_name: "Iceland",
  1167. chinese_name: "冰岛",
  1168. country_code: "IS",
  1169. phone_code: "354"
  1170. },
  1171. {
  1172. english_name: "Belgium",
  1173. chinese_name: "比利时",
  1174. country_code: "BE",
  1175. phone_code: "32"
  1176. },
  1177. {
  1178. english_name: "Benin",
  1179. chinese_name: "贝宁",
  1180. country_code: "BJ",
  1181. phone_code: "229"
  1182. },
  1183. {
  1184. english_name: "Bulgaria",
  1185. chinese_name: "保加利亚",
  1186. country_code: "BG",
  1187. phone_code: "359"
  1188. },
  1189. {
  1190. english_name: "Bermuda",
  1191. chinese_name: "百慕大群岛",
  1192. country_code: "BM",
  1193. phone_code: "1441"
  1194. },
  1195. {
  1196. english_name: "Belarus",
  1197. chinese_name: "白俄罗斯",
  1198. country_code: "BY",
  1199. phone_code: "375"
  1200. },
  1201. {
  1202. english_name: "Brazil",
  1203. chinese_name: "巴西",
  1204. country_code: "BR",
  1205. phone_code: "55"
  1206. },
  1207. {
  1208. english_name: "Panama",
  1209. chinese_name: "巴拿马",
  1210. country_code: "PA",
  1211. phone_code: "507"
  1212. },
  1213. {
  1214. english_name: "Bahrain",
  1215. chinese_name: "巴林",
  1216. country_code: "BH",
  1217. phone_code: "973"
  1218. },
  1219. {
  1220. english_name: "Palestine",
  1221. chinese_name: "巴勒斯坦",
  1222. country_code: "BL",
  1223. phone_code: "970"
  1224. },
  1225. {
  1226. english_name: "Paraguay",
  1227. chinese_name: "巴拉圭",
  1228. country_code: "PY",
  1229. phone_code: "595"
  1230. },
  1231. {
  1232. english_name: "Pakistan",
  1233. chinese_name: "巴基斯坦",
  1234. country_code: "PK",
  1235. phone_code: "92"
  1236. },
  1237. {
  1238. english_name: "Bahamas",
  1239. chinese_name: "巴哈马",
  1240. country_code: "BS",
  1241. phone_code: "1242"
  1242. },
  1243. {
  1244. english_name: "Papua New Guinea",
  1245. chinese_name: "巴布亚新几内亚",
  1246. country_code: "PG",
  1247. phone_code: "675"
  1248. },
  1249. {
  1250. english_name: "Barbados",
  1251. chinese_name: "巴巴多斯",
  1252. country_code: "BB",
  1253. phone_code: "1246"
  1254. },
  1255. {
  1256. english_name: "Australia",
  1257. chinese_name: "澳大利亚",
  1258. country_code: "AU",
  1259. phone_code: "61"
  1260. },
  1261. {
  1262. english_name: "Austria",
  1263. chinese_name: "奥地利",
  1264. country_code: "AT",
  1265. phone_code: "43"
  1266. },
  1267. {
  1268. english_name: "Antigua and Barbuda",
  1269. chinese_name: "安提瓜和巴布达",
  1270. country_code: "AG",
  1271. phone_code: "1268"
  1272. },
  1273. {
  1274. english_name: "Anguilla",
  1275. chinese_name: "安圭拉",
  1276. country_code: "AI",
  1277. phone_code: "1264"
  1278. },
  1279. {
  1280. english_name: "Angola",
  1281. chinese_name: "安哥拉",
  1282. country_code: "AO",
  1283. phone_code: "244"
  1284. },
  1285. {
  1286. english_name: "Andorra",
  1287. chinese_name: "安道尔",
  1288. country_code: "AD",
  1289. phone_code: "376"
  1290. },
  1291. {
  1292. english_name: "Estonia",
  1293. chinese_name: "爱沙尼亚",
  1294. country_code: "EE",
  1295. phone_code: "372"
  1296. },
  1297. {
  1298. english_name: "Ireland",
  1299. chinese_name: "爱尔兰",
  1300. country_code: "IE",
  1301. phone_code: "353"
  1302. },
  1303. {
  1304. english_name: "Ethiopia",
  1305. chinese_name: "埃塞俄比亚",
  1306. country_code: "ET",
  1307. phone_code: "251"
  1308. },
  1309. {
  1310. english_name: "Egypt",
  1311. chinese_name: "埃及",
  1312. country_code: "EG",
  1313. phone_code: "20"
  1314. },
  1315. {
  1316. english_name: "Azerbaijan",
  1317. chinese_name: "阿塞拜疆",
  1318. country_code: "AZ",
  1319. phone_code: "994"
  1320. },
  1321. {
  1322. english_name: "Oman",
  1323. chinese_name: "阿曼",
  1324. country_code: "OM",
  1325. phone_code: "968"
  1326. },
  1327. {
  1328. english_name: "Aruba",
  1329. chinese_name: "阿鲁巴",
  1330. country_code: "AW",
  1331. phone_code: "297"
  1332. },
  1333. {
  1334. english_name: "United Arab Emirates",
  1335. chinese_name: "阿拉伯联合酋长国",
  1336. country_code: "AE",
  1337. phone_code: "971"
  1338. },
  1339. {
  1340. english_name: "Argentina",
  1341. chinese_name: "阿根廷",
  1342. country_code: "AR",
  1343. phone_code: "54"
  1344. },
  1345. {
  1346. english_name: "Afghanistan",
  1347. chinese_name: "阿富汗",
  1348. country_code: "AF",
  1349. phone_code: "93"
  1350. },
  1351. {
  1352. english_name: "Algeria",
  1353. chinese_name: "阿尔及利亚",
  1354. country_code: "DZ",
  1355. phone_code: "213"
  1356. },
  1357. {
  1358. english_name: "Albania",
  1359. chinese_name: "阿尔巴尼亚",
  1360. country_code: "AL",
  1361. phone_code: "355"
  1362. }
  1363. ];
  1364. if (!Array) {
  1365. const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput");
  1366. _easycom_uni_easyinput2();
  1367. }
  1368. const _easycom_uni_easyinput = () => "../../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
  1369. if (!Math) {
  1370. _easycom_uni_easyinput();
  1371. }
  1372. const _sfc_main = {
  1373. __name: "phone-international-input",
  1374. props: {
  1375. verifyUsername: {
  1376. type: Boolean
  1377. }
  1378. },
  1379. emits: ["input"],
  1380. setup(__props, { emit: __emit }) {
  1381. const country = common_vendor.ref(countryData);
  1382. const selectedCode = common_vendor.ref("");
  1383. const selectedCountryCode = common_vendor.ref("");
  1384. const selectedIndex = common_vendor.ref(0);
  1385. const findIndexByCode = (code) => {
  1386. return country.value.findIndex((item) => item.phone_code == code);
  1387. };
  1388. const pickChange = (e) => {
  1389. selectedIndex.value = e.detail.value;
  1390. selectedCode.value = country.value[selectedIndex.value].phone_code;
  1391. selectedCountryCode.value = country.value[selectedIndex.value].country_code;
  1392. };
  1393. common_vendor.onLoad(() => {
  1394. const chinaIndex = findIndexByCode("86");
  1395. if (chinaIndex !== -1) {
  1396. selectedIndex.value = chinaIndex;
  1397. selectedCode.value = country.value[chinaIndex].phone_code;
  1398. selectedCountryCode.value = country.value[chinaIndex].country_code;
  1399. }
  1400. });
  1401. const emits = __emit;
  1402. const verifyMobile = (e) => {
  1403. const phone = e;
  1404. if (phone == "") {
  1405. emits("input", phone, "请输入手机号");
  1406. } else {
  1407. try {
  1408. const phoneParseMobile = common_vendor.parsePhoneNumber(phone, selectedCountryCode.value);
  1409. if (phoneParseMobile.isValid()) {
  1410. emits("input", phone, "");
  1411. } else {
  1412. emits("input", phone, "手机号码格式不正确");
  1413. }
  1414. } catch (e2) {
  1415. }
  1416. }
  1417. };
  1418. const state = common_vendor.reactive({
  1419. codeText: "获取验证码",
  1420. model: {
  1421. mobile: ""
  1422. // 手机号
  1423. }
  1424. });
  1425. return (_ctx, _cache) => {
  1426. return {
  1427. a: common_vendor.t(selectedCode.value),
  1428. b: common_assets._imports_0$1,
  1429. c: country.value.map((item) => item.chinese_name + " +" + item.phone_code),
  1430. d: selectedIndex.value,
  1431. e: common_vendor.o(pickChange),
  1432. f: common_vendor.t(common_vendor.unref(sheep_hooks_useModal.getSmsTimer)("smsLogin")),
  1433. g: !__props.verifyUsername || selectedCode.value != 86,
  1434. h: !__props.verifyUsername || selectedCode.value != 86 ? 1 : "",
  1435. i: common_vendor.o(($event) => common_vendor.unref(sheep_hooks_useModal.getSmsCode)("smsLogin", state.model.mobile)),
  1436. j: common_vendor.o(verifyMobile),
  1437. k: common_vendor.o(($event) => state.model.mobile = $event),
  1438. l: common_vendor.p({
  1439. placeholder: "请输入手机号",
  1440. inputBorder: false,
  1441. type: "number",
  1442. modelValue: state.model.mobile
  1443. })
  1444. };
  1445. };
  1446. }
  1447. };
  1448. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5db53ad8"], ["__file", "D:/zx/mall-front-app/sheep/components/s-auth-modal/components/phone-international-input.vue"]]);
  1449. wx.createComponent(Component);