52 lines
2.6 KiB
Plaintext
52 lines
2.6 KiB
Plaintext
<navigation-bar title="{{mode === 'edit' ? '编辑用户' : '新增用户'}}" back="{{true}}" color="#f6efe7" background="#081518"></navigation-bar>
|
|||
|
|
|
||
|
|
<view class="page-shell">
|
||
|
|
<view class="page-stack">
|
||
|
|
<view class="surface-card">
|
||
|
|
<text class="section-title">{{mode === 'edit' ? '更新用户资料' : '创建后台账号'}}</text>
|
||
|
|
<text class="section-desc">账号仅允许字母和数字,手机号保持全局唯一。店长创建美甲师时,这里会直接绑定当前店铺。</text>
|
||
|
|
|
||
|
|
<view class="field-group">
|
||
|
|
<text class="field-label">昵称</text>
|
||
|
|
<input class="field-input" value="{{form.nickname}}" data-field="nickname" bindinput="handleInputChange"></input>
|
||
|
|
</view>
|
||
|
|
<view class="field-group">
|
||
|
|
<text class="field-label">账号</text>
|
||
|
|
<input class="field-input" value="{{form.account}}" data-field="account" bindinput="handleInputChange"></input>
|
||
|
|
</view>
|
||
|
|
<view class="field-group">
|
||
|
|
<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">
|
||
|
|
<text class="field-label">{{mode === 'edit' ? '密码(留空则不修改)' : '登录密码'}}</text>
|
||
|
|
<input class="field-input" password value="{{form.password}}" data-field="password" bindinput="handleInputChange"></input>
|
||
|
|
</view>
|
||
|
|
<view class="field-group">
|
||
|
|
<text class="field-label">签名</text>
|
||
|
|
<textarea class="field-textarea" value="{{form.signature}}" data-field="signature" bindinput="handleInputChange"></textarea>
|
||
|
|
</view>
|
||
|
|
<view class="field-group">
|
||
|
|
<text class="field-label">角色</text>
|
||
|
|
<picker mode="selector" range="{{typeOptions}}" range-key="label" value="0" bindchange="handleTypeChange">
|
||
|
|
<view class="field-picker">{{currentTypeLabel || '请选择角色'}}</view>
|
||
|
|
</picker>
|
||
|
|
</view>
|
||
|
|
<view class="field-group">
|
||
|
|
<text class="field-label">绑定店铺</text>
|
||
|
|
<checkbox-group bindchange="handleShopCheck">
|
||
|
|
<block wx:for="{{shops}}" wx:key="id">
|
||
|
|
<label class="checkbox-chip {{item.checked ? 'active' : ''}}">
|
||
|
|
<checkbox value="{{item.valueId}}" checked="{{item.checked}}" />
|
||
|
|
{{item.shopName}}
|
||
|
|
</label>
|
||
|
|
</block>
|
||
|
|
</checkbox-group>
|
||
|
|
</view>
|
||
|
|
<view class="action-row">
|
||
|
|
<button class="primary-btn" bindtap="handleSubmit">保存用户</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|