支持管理账号手机号选填

This commit is contained in:
2026-07-21 07:42:32 +08:00
parent 8aa77ab44c
commit 0d947e4784
18 changed files with 192 additions and 68 deletions
@@ -568,7 +568,7 @@ Page({
if (!this.data.userForm.account) {
return '请输入账号'
}
if (!this.data.userForm.phone || this.data.userForm.phone.length !== 11) {
if (this.data.userForm.phone && this.data.userForm.phone.length !== 11) {
return '请输入 11 位手机号'
}
if (this.data.mode === 'create' && !this.data.userForm.password) {
@@ -13,7 +13,7 @@
<input class="field-input" value="{{userForm.account}}" data-field="account" bindinput="handleUserInput"></input>
</view>
<view class="field-group">
<text class="field-label">手机号</text>
<text class="field-label">手机号(选填)</text>
<input class="field-input" type="number" value="{{userForm.phone}}" data-field="phone" bindinput="handleUserInput"></input>
</view>
<view class="field-group">