Xiao_123 преди 1 година
родител
ревизия
d4607892de
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 3 0
      src/styles/index.css
  2. 3 6
      src/views/login/components/phone.vue

+ 3 - 0
src/styles/index.css

@@ -0,0 +1,3 @@
+:root {
+  --zIndex-dialog: #00897B
+}

+ 3 - 6
src/views/login/components/phone.vue

@@ -39,17 +39,14 @@ const phoneRules = ref([
     return '请输入手机号'
   },
   value => {
-    if (value?.length <= 11) return true
-    return 'Name must be less than 10 characters.'
+    if (value?.length <= 11 && /^1[3456789]\d{9}$/.test(value)) return true
+    return '请输入正确的手机号码'
   }
 ])
 // 手机号区域
 const currentAear = ref('中国大陆')
 const items = [
-  { title: '中国大陆', value: '86' },
-  { title: '中国香港', value: '852' },
-  { title: '中国澳门', value: '853' },
-  { title: '西班牙', value: '34' }
+  { title: '中国大陆', value: '86' }
 ]
 const handleChangeCurrentAear = (e) => {
   currentAear.value = e.target.innerText