支持管理账号手机号选填

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
@@ -439,7 +439,7 @@ Page({
if (!form.account) {
return '请输入账号'
}
if (!form.phone || form.phone.length !== 11) {
if (form.phone && form.phone.length !== 11) {
return '请输入 11 位手机号'
}
if (this.data.mode === 'create' && !form.password) {
@@ -4,7 +4,7 @@
<view class="page-stack">
<view class="surface-card">
<text class="section-title">{{mode === 'edit' ? '更新用户资料' : '创建后台账号'}}</text>
<text class="section-desc">账号仅允许字母和数字,手机号保持全局唯一。店长创建美甲师时,这里会直接绑定当前店铺。</text>
<text class="section-desc">账号仅允许字母和数字,手机号选填且填写后保持全局唯一。店长创建美甲师时,这里会直接绑定当前店铺。</text>
<view class="field-group">
<text class="field-label">昵称</text>
@@ -15,7 +15,7 @@
<input class="field-input" value="{{form.account}}" data-field="account" bindinput="handleInputChange"></input>
</view>
<view class="field-group">
<text class="field-label">手机号</text>
<text class="field-label">手机号(选填)</text>
<input class="field-input" type="number" value="{{form.phone}}" data-field="phone" bindinput="handleInputChange"></input>
</view>
<view class="field-group">