Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-06-13 11:42:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e6c8627710a7396948be64f065e60c82fa2d0dcd
e6c86277
1 parent
5bb8d25c
feat(用户设置): 添加手机号显示功能
在用户设置页面中显示用户的手机号码,从API响应中获取并绑定到模板
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/views/profile/SettingsPage.vue
src/views/profile/SettingsPage.vue
View file @
e6c8627
<!--
* @Date: 2025-03-24 13:04:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-13 11:
23:1
9
* @LastEditTime: 2025-06-13 11:
41:5
9
* @FilePath: /mlaj/src/views/profile/SettingsPage.vue
* @Description: 用户设置页面
-->
...
...
@@ -92,7 +92,7 @@
<div class="flex items-center justify-between">
<div>
<h3 class="text-base font-medium text-gray-900">修改手机号</h3>
<p class="text-sm text-gray-500">
修改手机号
</p>
<p class="text-sm text-gray-500">
{{ phone }}
</p>
</div>
<ChevronRightIcon class="w-5 h-5 text-gray-400" />
</div>
...
...
@@ -123,6 +123,9 @@ const userAvatar = ref('');
// 用户名
const username = ref('');
// 手机号
const phone = ref('');
// 获取用户信息
onMounted(async () => {
try {
...
...
@@ -130,6 +133,7 @@ onMounted(async () => {
if (response.data) {
userAvatar.value = response.data.user.avatar;
username.value = response.data.user.name;
phone.value = response.data.user.mobile;
}
} catch (error) {
console.error('获取用户信息失败:', error);
...
...
Please
register
or
login
to post a comment