|
@@ -42,7 +42,7 @@
|
|
<script>
|
|
<script>
|
|
import selectCall from '../country.js'
|
|
import selectCall from '../country.js'
|
|
import {mapState} from 'vuex'
|
|
import {mapState} from 'vuex'
|
|
-import { encodeStr } from '@/util'
|
|
|
|
|
|
+import { encodeStr, reg } from '@/util'
|
|
import { Base64 } from 'js-base64'
|
|
import { Base64 } from 'js-base64'
|
|
export default {
|
|
export default {
|
|
computed: {
|
|
computed: {
|
|
@@ -86,9 +86,10 @@ export default {
|
|
this.codeActive = item
|
|
this.codeActive = item
|
|
},
|
|
},
|
|
async getAuthCode () {
|
|
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', {
|
|
let res = await this.$store.dispatch('getAuthCode', {
|
|
phone: this.phone,
|
|
phone: this.phone,
|