Merge branch 'feture-yt' into dev
# Conflicts: # pages/projectModule/projectDetail/projectDetail.js # pages/projectModule/projectDetail/projectDetail.wxml # pages/projectModule/projectList/projectList.js # pages/projectModule/projectList/projectList.wxml # pages/projectModule/userProject/userProject.js
This commit is contained in:
@ -52,6 +52,16 @@ Page({
|
||||
wx.showToast({ title: '手机号格式不正确', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// 正则表达式,匹配非汉字字符
|
||||
const reg = /[^\u4e00-\u9fa5]/;
|
||||
// 判断输入的值是否含有非汉字字符
|
||||
if (reg.test(salespersonName)) {
|
||||
wx.showToast({
|
||||
title: '姓名必须为汉字',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
wx.showLoading({
|
||||
title: '申请中',
|
||||
|
@ -13,6 +13,8 @@
|
||||
placeholder="请输入"
|
||||
value="{{salespersonPhone}}"
|
||||
bindinput="onPhoneInput"
|
||||
type="number"
|
||||
maxlength="16"
|
||||
disabled="{{mode === 'view'}}" />
|
||||
<view class="self-stretch divider"></view>
|
||||
</view>
|
||||
|
Reference in New Issue
Block a user