Browse Source

手机号增添不同国家的区号全

wangyi/feature-20251022162725-启动页登录注册
Ethereal 1 month ago
parent
commit
14753b4af7
  1. 1341
      pages/start/login/list.js
  2. 44
      pages/start/login/login.vue
  3. BIN
      static/flag/ad.png
  4. BIN
      static/flag/ae.png
  5. BIN
      static/flag/af.png
  6. BIN
      static/flag/ag.png
  7. BIN
      static/flag/ai.png
  8. BIN
      static/flag/al.png
  9. BIN
      static/flag/am.png
  10. BIN
      static/flag/an.png
  11. BIN
      static/flag/ao.png
  12. BIN
      static/flag/aq.png
  13. BIN
      static/flag/ar.png
  14. BIN
      static/flag/as.png
  15. BIN
      static/flag/at.png
  16. BIN
      static/flag/au.png
  17. BIN
      static/flag/aw.png
  18. BIN
      static/flag/ax.png
  19. BIN
      static/flag/az.png
  20. BIN
      static/flag/ba.png
  21. BIN
      static/flag/bb.png
  22. BIN
      static/flag/bd.png
  23. BIN
      static/flag/be.png
  24. BIN
      static/flag/bf.png
  25. BIN
      static/flag/bg.png
  26. BIN
      static/flag/bh.png
  27. BIN
      static/flag/bi.png
  28. BIN
      static/flag/bj.png
  29. BIN
      static/flag/bl.png
  30. BIN
      static/flag/bm.png
  31. BIN
      static/flag/bn.png
  32. BIN
      static/flag/bo.png
  33. BIN
      static/flag/bq.png
  34. BIN
      static/flag/br.png
  35. BIN
      static/flag/bs.png
  36. BIN
      static/flag/bt.png
  37. BIN
      static/flag/bv.png
  38. BIN
      static/flag/bw.png
  39. BIN
      static/flag/by.png
  40. BIN
      static/flag/bz.png
  41. BIN
      static/flag/ca.png
  42. BIN
      static/flag/cc.png
  43. BIN
      static/flag/cd.png
  44. BIN
      static/flag/cf.png
  45. BIN
      static/flag/cg.png
  46. BIN
      static/flag/ch.png
  47. BIN
      static/flag/ci.png
  48. BIN
      static/flag/ck.png
  49. BIN
      static/flag/cl.png
  50. BIN
      static/flag/cm.png
  51. BIN
      static/flag/cn.png
  52. BIN
      static/flag/co.png
  53. BIN
      static/flag/cr.png
  54. BIN
      static/flag/cu.png
  55. BIN
      static/flag/cv.png
  56. BIN
      static/flag/cw.png
  57. BIN
      static/flag/cx.png
  58. BIN
      static/flag/cy.png
  59. BIN
      static/flag/cz.png
  60. BIN
      static/flag/de.png
  61. BIN
      static/flag/dj.png
  62. BIN
      static/flag/dk.png
  63. BIN
      static/flag/dm.png
  64. BIN
      static/flag/do.png
  65. BIN
      static/flag/dz.png
  66. BIN
      static/flag/ec.png
  67. BIN
      static/flag/ee.png
  68. BIN
      static/flag/eg.png
  69. BIN
      static/flag/eh.png
  70. BIN
      static/flag/er.png
  71. BIN
      static/flag/es.png
  72. BIN
      static/flag/et.png
  73. BIN
      static/flag/eu.png
  74. BIN
      static/flag/fi.png
  75. BIN
      static/flag/fj.png
  76. BIN
      static/flag/fk.png
  77. BIN
      static/flag/fm.png
  78. BIN
      static/flag/fo.png
  79. BIN
      static/flag/fr.png
  80. BIN
      static/flag/ga.png
  81. BIN
      static/flag/gb-eng.png
  82. BIN
      static/flag/gb-nir.png
  83. BIN
      static/flag/gb-sct.png
  84. BIN
      static/flag/gb-wls.png
  85. BIN
      static/flag/gb.png
  86. BIN
      static/flag/gd.png
  87. BIN
      static/flag/ge.png
  88. BIN
      static/flag/gf.png
  89. BIN
      static/flag/gg.png
  90. BIN
      static/flag/gh.png
  91. BIN
      static/flag/gi.png
  92. BIN
      static/flag/gl.png
  93. BIN
      static/flag/gm.png
  94. BIN
      static/flag/gn.png
  95. BIN
      static/flag/gp.png
  96. BIN
      static/flag/gq.png
  97. BIN
      static/flag/gr.png
  98. BIN
      static/flag/gs.png
  99. BIN
      static/flag/gt.png
  100. BIN
      static/flag/gu.png

1341
pages/start/login/list.js
File diff suppressed because it is too large
View File

44
pages/start/login/login.vue

@ -45,7 +45,7 @@
/> />
<view v-else class="phone-input-container"> <view v-else class="phone-input-container">
<view class="country-code-selector" @click="showCountryPicker"> <view class="country-code-selector" @click="showCountryPicker">
<text class="country-flag">{{ selectedCountry.flag }}</text>
<image class="country-flag-img" :src="selectedCountry.flag" mode="aspectFit"></image>
<text class="country-code">{{ selectedCountry.code }}</text> <text class="country-code">{{ selectedCountry.code }}</text>
<text class="arrow-down"></text> <text class="arrow-down"></text>
</view> </view>
@ -96,6 +96,8 @@
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
//
import countryList from './list.js';
const email = ref(""); const email = ref("");
const phone = ref(""); const phone = ref("");
@ -103,29 +105,22 @@ const agreed = ref(false);
const switchType = ref("Email"); // const switchType = ref("Email"); //
const { safeAreaInsets } = uni.getSystemInfoSync(); const { safeAreaInsets } = uni.getSystemInfoSync();
//
const countries = ref([
{ name: '中国', code: '+86', flag: '🇨🇳' },
{ name: '美国', code: '+1', flag: '🇺🇸' },
{ name: '英国', code: '+44', flag: '🇬🇧' },
{ name: '日本', code: '+81', flag: '🇯🇵' },
{ name: '韩国', code: '+82', flag: '🇰🇷' },
{ name: '德国', code: '+49', flag: '🇩🇪' },
{ name: '法国', code: '+33', flag: '🇫🇷' },
{ name: '加拿大', code: '+1', flag: '🇨🇦' },
{ name: '澳大利亚', code: '+61', flag: '🇦🇺' },
{ name: '俄罗斯', code: '+7', flag: '🇷🇺' },
{ name: '印度', code: '+91', flag: '🇮🇳' },
{ name: '巴西', code: '+55', flag: '🇧🇷' },
]);
//
const selectedCountry = ref(countries.value[0]);
// 使list.js
const countries = ref(countryList.list.map(item => ({
name: item.name,
code: `+${item.tel}`,
flag: item.flag,
short: item.short,
en: item.en
})));
//
const selectedCountry = ref(countries.value.find(country => country.short === 'CN') || countries.value[0]);
// //
function showCountryPicker() { function showCountryPicker() {
uni.showActionSheet({ uni.showActionSheet({
itemList: countries.value.map(country => `${country.flag} ${country.name} ${country.code}`),
itemList: countries.value.map(country => `${country.name} ${country.code}`),
success: function (res) { success: function (res) {
selectedCountry.value = countries.value[res.tapIndex]; selectedCountry.value = countries.value[res.tapIndex];
} }
@ -326,7 +321,7 @@ function onPhoneInput(e) {
.phone-input-container { .phone-input-container {
display: flex; display: flex;
align-items: center; align-items: center;
width: 90%;
width: 95.8%;
height: 80rpx; height: 80rpx;
border-radius: 20rpx; border-radius: 20rpx;
border: 2rpx solid #e5e5e5; border: 2rpx solid #e5e5e5;
@ -340,7 +335,7 @@ function onPhoneInput(e) {
padding: 0 20rpx; padding: 0 20rpx;
height: 100%; height: 100%;
border-right: 2rpx solid #e5e5e5; border-right: 2rpx solid #e5e5e5;
background-color: #f0f0f0;
background-color: #f5f5f5;
border-radius: 20rpx 0 0 20rpx; border-radius: 20rpx 0 0 20rpx;
} }
@ -350,8 +345,9 @@ function onPhoneInput(e) {
margin-right: 10rpx; margin-right: 10rpx;
} }
.country-flag {
font-size: 32rpx;
.country-flag-img {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }

BIN
static/flag/ad.png

After

Width: 100  |  Height: 70  |  Size: 2.1 KiB

BIN
static/flag/ae.png

After

Width: 100  |  Height: 50  |  Size: 170 B

BIN
static/flag/af.png

After

Width: 100  |  Height: 67  |  Size: 2.6 KiB

BIN
static/flag/ag.png

After

Width: 100  |  Height: 67  |  Size: 2.0 KiB

BIN
static/flag/ai.png

After

Width: 100  |  Height: 50  |  Size: 1.3 KiB

BIN
static/flag/al.png

After

Width: 100  |  Height: 71  |  Size: 1.7 KiB

BIN
static/flag/am.png

After

Width: 100  |  Height: 50  |  Size: 122 B

BIN
static/flag/an.png

After

Width: 100  |  Height: 67  |  Size: 610 B

BIN
static/flag/ao.png

After

Width: 100  |  Height: 67  |  Size: 1.4 KiB

BIN
static/flag/aq.png

After

Width: 100  |  Height: 100  |  Size: 6.0 KiB

BIN
static/flag/ar.png

After

Width: 100  |  Height: 63  |  Size: 991 B

BIN
static/flag/as.png

After

Width: 100  |  Height: 50  |  Size: 2.0 KiB

BIN
static/flag/at.png

After

Width: 100  |  Height: 67  |  Size: 133 B

BIN
static/flag/au.png

After

Width: 100  |  Height: 50  |  Size: 1.1 KiB

BIN
static/flag/aw.png

After

Width: 100  |  Height: 67  |  Size: 658 B

BIN
static/flag/ax.png

After

Width: 100  |  Height: 65  |  Size: 279 B

BIN
static/flag/az.png

After

Width: 100  |  Height: 50  |  Size: 451 B

BIN
static/flag/ba.png

After

Width: 100  |  Height: 50  |  Size: 741 B

BIN
static/flag/bb.png

After

Width: 100  |  Height: 67  |  Size: 791 B

BIN
static/flag/bd.png

After

Width: 100  |  Height: 60  |  Size: 367 B

BIN
static/flag/be.png

After

Width: 100  |  Height: 87  |  Size: 168 B

BIN
static/flag/bf.png

After

Width: 100  |  Height: 67  |  Size: 560 B

BIN
static/flag/bg.png

After

Width: 100  |  Height: 60  |  Size: 106 B

BIN
static/flag/bh.png

After

Width: 100  |  Height: 60  |  Size: 303 B

BIN
static/flag/bi.png

After

Width: 100  |  Height: 60  |  Size: 1.3 KiB

BIN
static/flag/bj.png

After

Width: 100  |  Height: 67  |  Size: 169 B

BIN
static/flag/bl.png

After

Width: 100  |  Height: 67  |  Size: 6.2 KiB

BIN
static/flag/bm.png

After

Width: 100  |  Height: 50  |  Size: 2.0 KiB

BIN
static/flag/bn.png

After

Width: 100  |  Height: 50  |  Size: 2.3 KiB

BIN
static/flag/bo.png

After

Width: 100  |  Height: 68  |  Size: 1.4 KiB

BIN
static/flag/bq.png

After

Width: 100  |  Height: 67  |  Size: 159 B

BIN
static/flag/br.png

After

Width: 100  |  Height: 70  |  Size: 2.0 KiB

BIN
static/flag/bs.png

After

Width: 100  |  Height: 50  |  Size: 553 B

BIN
static/flag/bt.png

After

Width: 100  |  Height: 67  |  Size: 4.0 KiB

BIN
static/flag/bv.png

After

Width: 100  |  Height: 73  |  Size: 260 B

BIN
static/flag/bw.png

After

Width: 100  |  Height: 67  |  Size: 172 B

BIN
static/flag/by.png

After

Width: 100  |  Height: 50  |  Size: 1.4 KiB

BIN
static/flag/bz.png

After

Width: 100  |  Height: 67  |  Size: 5.6 KiB

BIN
static/flag/ca.png

After

Width: 100  |  Height: 50  |  Size: 765 B

BIN
static/flag/cc.png

After

Width: 100  |  Height: 50  |  Size: 1.3 KiB

BIN
static/flag/cd.png

After

Width: 100  |  Height: 75  |  Size: 796 B

BIN
static/flag/cf.png

After

Width: 100  |  Height: 67  |  Size: 554 B

BIN
static/flag/cg.png

After

Width: 100  |  Height: 67  |  Size: 354 B

BIN
static/flag/ch.png

After

Width: 100  |  Height: 100  |  Size: 172 B

BIN
static/flag/ci.png

After

Width: 100  |  Height: 67  |  Size: 165 B

BIN
static/flag/ck.png

After

Width: 100  |  Height: 50  |  Size: 1.9 KiB

BIN
static/flag/cl.png

After

Width: 100  |  Height: 67  |  Size: 517 B

BIN
static/flag/cm.png

After

Width: 100  |  Height: 67  |  Size: 482 B

BIN
static/flag/cn.png

After

Width: 100  |  Height: 67  |  Size: 763 B

BIN
static/flag/co.png

After

Width: 100  |  Height: 67  |  Size: 158 B

BIN
static/flag/cr.png

After

Width: 100  |  Height: 60  |  Size: 109 B

BIN
static/flag/cu.png

After

Width: 100  |  Height: 50  |  Size: 793 B

BIN
static/flag/cv.png

After

Width: 100  |  Height: 59  |  Size: 1.0 KiB

BIN
static/flag/cw.png

After

Width: 100  |  Height: 67  |  Size: 633 B

BIN
static/flag/cx.png

After

Width: 100  |  Height: 50  |  Size: 1.5 KiB

BIN
static/flag/cy.png

After

Width: 100  |  Height: 67  |  Size: 1.6 KiB

BIN
static/flag/cz.png

After

Width: 100  |  Height: 67  |  Size: 394 B

BIN
static/flag/de.png

After

Width: 100  |  Height: 60  |  Size: 106 B

BIN
static/flag/dj.png

After

Width: 100  |  Height: 67  |  Size: 1.1 KiB

BIN
static/flag/dk.png

After

Width: 100  |  Height: 76  |  Size: 200 B

BIN
static/flag/dm.png

After

Width: 100  |  Height: 50  |  Size: 1.2 KiB

BIN
static/flag/do.png

After

Width: 100  |  Height: 67  |  Size: 700 B

BIN
static/flag/dz.png

After

Width: 100  |  Height: 67  |  Size: 891 B

BIN
static/flag/ec.png

After

Width: 100  |  Height: 67  |  Size: 2.5 KiB

BIN
static/flag/ee.png

After

Width: 100  |  Height: 64  |  Size: 158 B

BIN
static/flag/eg.png

After

Width: 100  |  Height: 67  |  Size: 1.1 KiB

BIN
static/flag/eh.png

After

Width: 100  |  Height: 50  |  Size: 656 B

BIN
static/flag/er.png

After

Width: 100  |  Height: 50  |  Size: 1.4 KiB

BIN
static/flag/es.png

After

Width: 100  |  Height: 67  |  Size: 1.7 KiB

BIN
static/flag/et.png

After

Width: 100  |  Height: 50  |  Size: 1.3 KiB

BIN
static/flag/eu.png

After

Width: 100  |  Height: 67  |  Size: 1.4 KiB

BIN
static/flag/fi.png

After

Width: 100  |  Height: 61  |  Size: 186 B

BIN
static/flag/fj.png

After

Width: 100  |  Height: 50  |  Size: 1.8 KiB

BIN
static/flag/fk.png

After

Width: 100  |  Height: 50  |  Size: 2.2 KiB

BIN
static/flag/fm.png

After

Width: 100  |  Height: 53  |  Size: 595 B

BIN
static/flag/fo.png

After

Width: 100  |  Height: 73  |  Size: 260 B

BIN
static/flag/fr.png

After

Width: 100  |  Height: 67  |  Size: 165 B

BIN
static/flag/ga.png

After

Width: 100  |  Height: 75  |  Size: 109 B

BIN
static/flag/gb-eng.png

After

Width: 100  |  Height: 60  |  Size: 99 B

BIN
static/flag/gb-nir.png

After

Width: 100  |  Height: 50  |  Size: 545 B

BIN
static/flag/gb-sct.png

After

Width: 100  |  Height: 60  |  Size: 468 B

BIN
static/flag/gb-wls.png

After

Width: 100  |  Height: 60  |  Size: 5.6 KiB

BIN
static/flag/gb.png

After

Width: 100  |  Height: 50  |  Size: 545 B

BIN
static/flag/gd.png

After

Width: 100  |  Height: 60  |  Size: 1.5 KiB

BIN
static/flag/ge.png

After

Width: 100  |  Height: 67  |  Size: 750 B

BIN
static/flag/gf.png

After

Width: 100  |  Height: 67  |  Size: 738 B

BIN
static/flag/gg.png

After

Width: 100  |  Height: 67  |  Size: 306 B

BIN
static/flag/gh.png

After

Width: 100  |  Height: 67  |  Size: 549 B

BIN
static/flag/gi.png

After

Width: 100  |  Height: 50  |  Size: 1.6 KiB

BIN
static/flag/gl.png

After

Width: 100  |  Height: 67  |  Size: 852 B

BIN
static/flag/gm.png

After

Width: 100  |  Height: 67  |  Size: 185 B

BIN
static/flag/gn.png

After

Width: 100  |  Height: 67  |  Size: 169 B

BIN
static/flag/gp.png

After

Width: 100  |  Height: 67  |  Size: 165 B

BIN
static/flag/gq.png

After

Width: 100  |  Height: 67  |  Size: 1.2 KiB

BIN
static/flag/gr.png

After

Width: 100  |  Height: 67  |  Size: 308 B

BIN
static/flag/gs.png

After

Width: 100  |  Height: 50  |  Size: 2.8 KiB

BIN
static/flag/gt.png

After

Width: 100  |  Height: 63  |  Size: 1.3 KiB

BIN
static/flag/gu.png

After

Width: 100  |  Height: 54  |  Size: 1.4 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save