Files
ai_wht_wechat/miniprogram/miniprogram/pages/profile/user-info/user-info.wxml
2026-01-07 10:42:04 +08:00

58 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--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>