|
|
@@ -32,11 +32,11 @@ export default {
|
|
|
},
|
|
|
label: {
|
|
|
type: String,
|
|
|
- default: '标题'
|
|
|
+ default: '手机号'
|
|
|
},
|
|
|
placeholder: {
|
|
|
type: String,
|
|
|
- default: '请输入'
|
|
|
+ default: '请输入手机号码'
|
|
|
},
|
|
|
disabled: {
|
|
|
default: false
|
|
|
@@ -79,24 +79,13 @@ export default {
|
|
|
getCode(){
|
|
|
if (this.inputValue === '') {
|
|
|
uni.showToast({
|
|
|
- 'title': "请输入手机号码",
|
|
|
+ 'title': "请输入"+this.label,
|
|
|
'icon': 'error',
|
|
|
'mask': true,
|
|
|
'duration': 1500
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
- let regPhone = /^(?:(?:\+|00)86)?1\d{10}$/;
|
|
|
- if (!regPhone.test(this.inputValue)) {
|
|
|
- uni.showToast({
|
|
|
- 'title': "手机号码错误",
|
|
|
- 'icon': 'error',
|
|
|
- 'mask': true,
|
|
|
- 'duration': 1500
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- console.log('sadasdsa')
|
|
|
this.$emit('getCode')
|
|
|
},
|
|
|
setCodeNum(){
|