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

手机号仅支持中国大陆

上级 fa1b52d9
......@@ -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-forms-item>
......@@ -51,7 +52,7 @@
text: '隐私政策',
to: '/pages/ucenter/agree-list/privacy/privacy'
}],
phoneArea: ['+86', '+87'],
phoneArea: ['+86'],
currenPhoneArea: '+86',
phoneNumber: '',
......@@ -105,7 +106,11 @@
})
},
selectPhoneArea(event) {
this.currenPhoneArea = this.phoneArea[event.detail.value];
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: {
......@@ -115,7 +116,11 @@
// 下边是可以登录
},
selectPhoneArea(event) {
this.currenPhoneArea = this.phoneArea[event.detail.value];
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.
先完成此消息的编辑!
想要评论请 注册