支持管理账号手机号选填
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user