Преглед на файлове

feat:移动端邮箱格式校验

xzh преди 4 години
родител
ревизия
dd03353998
променени са 2 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 5 4
      mobile/src/pages/account/mailRegister/index.vue
  2. 1 0
      mobile/src/pages/account/mailRegister/style.scss

+ 5 - 4
mobile/src/pages/account/mailRegister/index.vue

@@ -42,7 +42,7 @@
 <script>
 import selectCall from '../country.js'
 import {mapState} from 'vuex'
-import { encodeStr } from '@/util'
+import { encodeStr, reg } from '@/util'
 import { Base64 } from 'js-base64'
 export default {
   computed: {
@@ -86,9 +86,10 @@ export default {
       this.codeActive = item
     },
     async getAuthCode () {
-      // if (!reg.phone.test(this.phone)) {
-      //   return
-      // }
+      if (!reg.email.test(this.phone)) {
+        this.$alert(this.$t('login.currentEmailTip'))
+        return
+      }
 
       let res = await this.$store.dispatch('getAuthCode', {
         phone: this.phone,

+ 1 - 0
mobile/src/pages/account/mailRegister/style.scss

@@ -150,6 +150,7 @@ input[type='password']{
 .send-btn {
   font-size: 14px;
   padding: 0 10px;
+  word-wrap: nowrap;
 }
 
 @media screen and (max-width: 340px) {