手机号

This commit is contained in:
2020-09-05 10:54:53 +08:00
parent d0e58b876a
commit e1a74972f2
4 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
</view>
<view>
<label for="phone">手机号:</label>
<input type="number" id="phone" v-model="phone" maxlength="11" placeholder="请输入手机号" />
<input type="number" id="phone" ref='phone' maxlength="11" placeholder="请输入手机号" />
</view>
<view @click="show=true">
<label for="address">居住地址:</label>
@@ -121,11 +121,11 @@ export default {
this.$u.toast('姓名不能为空');
return false;
}
if(this.$u.test.isEmpty(this.phone)) {
if(this.$u.test.isEmpty(this.$refs.phone.valueSync)) {
this.$u.toast('手机号不能为空');
return false;
}
if(!this.$u.test.mobile(this.phone)) {
if(!this.$u.test.mobile(this.$refs.phone.valueSync)) {
this.$u.toast('手机号错误');
return false;
}
@@ -153,7 +153,7 @@ export default {
this.isSubmit = false;
this.$u.api.applyExpert({
name: this.name,
mobile: this.phone,
mobile: this.$refs.phone.valueSync,
address: this.address + this.details,
industry: this.checkedIndustryList,
hobby: this.checkedHobbyList,

View File

@@ -22,6 +22,7 @@
:header="header"
:form-data="formData"
:name="fileName"
:size-type="['original']"
@on-list-change="setImageList"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
@@ -33,6 +34,7 @@
</template>
<script>
export default {
name: 'CommonView',
data() {
return {
count: 3,