58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
<!--pages/profile/user-info/user-info.wxml-->
|
||
<view class="page-container">
|
||
<form bindsubmit="onFormSubmit">
|
||
<!-- 资料编辑区域 -->
|
||
<view class="info-section">
|
||
<!-- 头像,使用微信官方选择头像能力 -->
|
||
<view class="info-item">
|
||
<view class="item-label">头像</view>
|
||
<view class="item-value">
|
||
<button class="avatar-btn" open-type="chooseAvatar" bindchooseavatar="onChooseWechatAvatar">
|
||
<view class="avatar-preview">
|
||
<image wx:if="{{avatar}}" class="avatar-img-small" src="{{avatar}}" mode="aspectFill" />
|
||
<text wx:else class="avatar-icon"></text>
|
||
</view>
|
||
</button>
|
||
<text class="item-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 昵称,可编辑 -->
|
||
<view class="info-item">
|
||
<view class="item-label">昵称</view>
|
||
<view class="item-value">
|
||
<input class="value-input" name="nickname" type="nickname" value="{{nickname}}" placeholder="请输入昵称" maxlength="20" bindinput="onNicknameInput" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 邮箱,可编辑 -->
|
||
<view class="info-item">
|
||
<view class="item-label">邮箱</view>
|
||
<view class="item-value">
|
||
<input class="value-input" name="email" value="{{email}}" placeholder="请输入邮箱" bindinput="onEmailInput" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 手机号,只读 -->
|
||
<view class="info-item">
|
||
<view class="item-label">手机号</view>
|
||
<view class="item-value">
|
||
<text class="value-text">{{phone || '未绑定'}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 角色,只读 -->
|
||
<view class="info-item">
|
||
<view class="item-label">角色</view>
|
||
<view class="item-value">
|
||
<text class="value-text role">{{roleText}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="save-section">
|
||
<button class="save-btn" loading="{{saving}}" disabled="{{saving}}" form-type="submit">保存修改</button>
|
||
</view>
|
||
</form>
|
||
</view>
|