Files
mzltMpfqGS e4a087e67e init
2026-04-15 19:45:16 +08:00

92 lines
2.9 KiB
Plaintext
Raw Permalink 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/profile.wxml -->
<!-- 个人资料视图 -->
<view class="profile-container">
<!-- 头像区域 -->
<view class="avatar-section">
<button class="avatar-wrapper" open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
<image class="avatar-img" src="{{avatarUrl || '/static/images/default-avatar.png'}}" mode="aspectFill" />
<view class="avatar-tip">点击更换头像</view>
</button>
</view>
<!-- 表单区域 -->
<view class="form-section">
<view class="form-item">
<text class="form-label">昵称</text>
<input
class="form-input"
type="nickname"
placeholder="请输入昵称"
value="{{formData.nickname}}"
bindinput="onNicknameInput"
/>
</view>
<view class="form-item">
<text class="form-label">性别</text>
<picker class="form-picker" mode="selector" range="{{genderList}}" value="{{genderIndex}}" bindchange="onGenderChange">
<view class="picker-value">
{{genderList[genderIndex]}}
</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">生日</text>
<picker class="form-picker" mode="date" value="{{formData.birthday}}" bindchange="onBirthdayChange">
<view class="picker-value">
{{formData.birthday || '请选择生日'}}
</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">简介</text>
<input
class="form-input"
type="nickname"
placeholder="请输入个人简介"
value="{{formData.bio}}"
bindinput="onBioInput"
maxlength="100"
/>
</view>
<view class="form-item">
<text class="form-label">邮箱</text>
<input
class="form-input"
type="nickname"
placeholder="请输入邮箱"
value="{{formData.email}}"
bindinput="onEmailInput"
/>
</view>
</view>
<!-- 保存按钮 -->
<button class="save-btn" bindtap="saveProfile" loading="{{loading}}">保存</button>
<!-- 其他功能 -->
<view class="function-list">
<view class="function-item" bindtap="goToChangePassword">
<text class="function-name">修改密码</text>
<text class="iconfont icon-arrow-right"></text>
</view>
<view class="function-item" bindtap="goToBindPhone">
<text class="function-name">绑定手机号</text>
<view class="function-value">
<text>{{formData.phone || '未绑定'}}</text>
<text class="iconfont icon-arrow-right"></text>
</view>
</view>
</view>
</view>
/**
* @联系作者16768118056
* @描述:(此项目非免费分享)源码百分百可用,搞定毕设不发愁,支持远程调试安装、二次开发、定制、讲解、文档类。
* @访问https://www.notmaker.com/detail/8326a897119d4542896c863a69d7bbe7/gtt20260415查看完整运行演示。
*/