107 lines
2.7 KiB
Plaintext
107 lines
2.7 KiB
Plaintext
<!-- 编辑个人信息页面 -->
|
||
<view class="edit-profile-container">
|
||
|
||
<view class="form-section">
|
||
<view class="form-item">
|
||
<view class="form-label">
|
||
<text class="label-text">用户名</text>
|
||
</view>
|
||
<input
|
||
class="form-input"
|
||
placeholder="请输入用户名"
|
||
value="{{username}}"
|
||
bindinput="onUsernameChange"
|
||
maxlength="50"
|
||
/>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<view class="form-label">
|
||
<text class="label-text">昵称</text>
|
||
</view>
|
||
<input
|
||
class="form-input"
|
||
placeholder="请输入昵称"
|
||
value="{{nickname}}"
|
||
bindinput="onNicknameChange"
|
||
maxlength="50"
|
||
/>
|
||
</view>
|
||
|
||
<view class="tips">
|
||
<text class="tips-text">用户名只能包含字母和数字,长度3-50字符</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 密码修改区域 -->
|
||
<view class="form-section">
|
||
<view class="section-title">
|
||
<text>修改密码</text>
|
||
<text class="section-subtitle">{{hasPassword ? '如不修改请留空' : '微信登录用户可设置密码'}}</text>
|
||
</view>
|
||
|
||
<view class="form-item" wx:if="{{hasPassword}}">
|
||
<view class="form-label">
|
||
<text class="label-text">当前密码</text>
|
||
</view>
|
||
<input
|
||
class="form-input"
|
||
type="password"
|
||
placeholder="请输入当前密码"
|
||
value="{{oldPassword}}"
|
||
bindinput="onOldPasswordChange"
|
||
maxlength="50"
|
||
/>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<view class="form-label">
|
||
<text class="label-text">新密码</text>
|
||
</view>
|
||
<input
|
||
class="form-input"
|
||
type="password"
|
||
placeholder="{{hasPassword ? '请输入新密码' : '请设置密码'}}"
|
||
value="{{newPassword}}"
|
||
bindinput="onNewPasswordChange"
|
||
maxlength="50"
|
||
/>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<view class="form-label">
|
||
<text class="label-text">确认密码</text>
|
||
</view>
|
||
<input
|
||
class="form-input"
|
||
type="password"
|
||
placeholder="请再次输入密码确认"
|
||
value="{{confirmPassword}}"
|
||
bindinput="onConfirmPasswordChange"
|
||
maxlength="50"
|
||
/>
|
||
</view>
|
||
|
||
<view class="tips">
|
||
<text class="tips-text">密码长度6-50字符,建议包含字母和数字</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="button-section">
|
||
<button
|
||
class="save-btn {{loading ? 'loading' : ''}}"
|
||
bindtap="handleSave"
|
||
disabled="{{loading}}"
|
||
>
|
||
{{loading ? '保存中...' : '保存修改'}}
|
||
</button>
|
||
|
||
<button
|
||
class="cancel-btn"
|
||
bindtap="handleCancel"
|
||
>
|
||
取消
|
||
</button>
|
||
</view>
|
||
</view>
|