From c2b3f4d268e6aa1c688cd4ce757981bc3a7b6416 Mon Sep 17 00:00:00 2001 From: zpc Date: Sun, 22 Jun 2025 00:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/server/user.js | 17 ++ components/youdas-container/no-data.vue | 27 +- .../youdas-container/page-container.vue | 12 +- pages.json | 6 + pages/me/account-info.vue | 282 ++++++++++++++++++ pages/me/me.vue | 17 +- static/app-plus/copy.png | Bin 0 -> 737 bytes static/camera.png | Bin 0 -> 1365 bytes 8 files changed, 336 insertions(+), 25 deletions(-) create mode 100644 pages/me/account-info.vue create mode 100644 static/app-plus/copy.png create mode 100644 static/camera.png diff --git a/common/server/user.js b/common/server/user.js index 459fd6d..5af898d 100644 --- a/common/server/user.js +++ b/common/server/user.js @@ -48,5 +48,22 @@ export const mobileLogin = async (phone, code, pid = 0) => { return res; } +/** + * 修改用户信息 + * @param {String} nickname 昵称 + * @param {String} avatar 头像 + * @param {String} imagebase 图片base64 + * @param {Number} gender 性别(1-男,2-女,3-保密,0-未设置) + * @returns {Promise} 是否成功 + */ +export const updateUserInfo = async (nickname, avatar, imagebase, gender = 3) => { + const res = await HttpRequest.post('/update_userinfo', { + nickname, + headimg: avatar, + imagebase, + gender + }); + return res.status == 1; +} diff --git a/components/youdas-container/no-data.vue b/components/youdas-container/no-data.vue index 74d507b..7d2fbcf 100644 --- a/components/youdas-container/no-data.vue +++ b/components/youdas-container/no-data.vue @@ -5,22 +5,19 @@ - \ No newline at end of file diff --git a/pages/me/me.vue b/pages/me/me.vue index 2cacbdc..173646f 100644 --- a/pages/me/me.vue +++ b/pages/me/me.vue @@ -6,7 +6,7 @@ -