提交 8a0d0628 编写于 作者: 芊里

手机号仅支持中国大陆

上级 fa1b52d9
......@@ -10,10 +10,11 @@
<uni-forms-item name="phone">
<uni-easyinput type="number" class="phone-input-box" :inputBorder="false"
v-model="formData.phone" maxlength="11" placeholder="请输入手机号">
<template slot="left">
<picker mode="selector" :range="phoneArea" @change="selectPhoneArea">
<text class="phone-area">{{currenPhoneArea}}</text>
</picker>
<template slot="left">
<!-- 当前仅支持中国大陆手机号 -->
<!-- <picker mode="selector" :range="phoneArea" @change="selectPhoneArea"> -->
<text class="phone-area" @click="selectPhoneArea">{{currenPhoneArea}}</text>
<!-- </picker> -->
</template>
</uni-easyinput>
</uni-forms-item>
......@@ -51,7 +52,7 @@
text: '隐私政策',
to: '/pages/ucenter/agree-list/privacy/privacy'
}],
phoneArea: ['+86', '+87'],
phoneArea: ['+86'],
currenPhoneArea: '+86',
phoneNumber: '',
......@@ -104,8 +105,12 @@
console.log('表单错误信息:', err);
})
},
selectPhoneArea(event) {
this.currenPhoneArea = this.phoneArea[event.detail.value];
selectPhoneArea(event) {
uni.showToast({
title: '当前仅支持中国大陆手机号',
icon: 'none'
});
// this.currenPhoneArea = this.phoneArea[event.detail.value];
},
sendShortMsg() {
if (!this.canGetShortMsg) return;
......
......@@ -11,9 +11,10 @@
<uni-easyinput type="number" class="phone-input-box" :inputBorder="false"
v-model="formData.phone" maxlength="11" placeholder="请输入手机号">
<template slot="left">
<picker mode="selector" :range="phoneArea" @change="selectPhoneArea">
<text class="phone-area">{{currenPhoneArea}}</text>
</picker>
<!-- 当前仅支持中国大陆手机号 -->
<!-- <picker mode="selector" :range="phoneArea" @change="selectPhoneArea"> -->
<text class="phone-area" @click="selectPhoneArea">{{currenPhoneArea}}</text>
<!-- </picker> -->
</template>
</uni-easyinput>
<uni-easyinput type="number" class="phone-input-box" :inputBorder="false"
......@@ -48,7 +49,7 @@
text: '隐私政策',
to: '/pages/ucenter/agree-list/privacy/privacy'
}],
phoneArea: ['+86', '+87'],
phoneArea: ['+86'],
currenPhoneArea: '+86',
formData: {
......@@ -114,8 +115,12 @@
if (!this.canLogin) return;
// 下边是可以登录
},
selectPhoneArea(event) {
this.currenPhoneArea = this.phoneArea[event.detail.value];
selectPhoneArea(event) {
uni.showToast({
title: '当前仅支持中国大陆手机号',
icon: 'none'
});
// this.currenPhoneArea = this.phoneArea[event.detail.value];
},
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册