From 219dda73d856508c34d5b71469153992c9417b4e Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Tue, 5 Aug 2025 16:37:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(user):=20=E6=B7=BB=E5=8A=A0=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=8A=B6=E6=80=81=E6=A3=80=E6=9F=A5=E5=B9=B6=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E7=94=A8=E6=88=B7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在用户页面添加登录状态检查功能 - 重构用户页面区分登录/未登录状态显示 - 添加统一的登录验证方法checkLoginAndNavigate - 优化退出登录逻辑,清除更多本地存储数据 - 在登录页面添加头像选择调试日志 - 修复OSS配置URL缺少斜杠的问题 --- config.js | 2 +- pages/login/index.vue | 8 ++- pages/user/index.vue | 173 +++++++++++++++++++++++++++++++++++--------------- 3 files changed, 128 insertions(+), 55 deletions(-) diff --git a/config.js b/config.js index 8933336..ab5cacc 100644 --- a/config.js +++ b/config.js @@ -26,7 +26,7 @@ const config = { const defaultConfig = { mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', aliOss : { - url : 'https://image.hhlm1688.com', + url : 'https://image.hhlm1688.com/', config : { //桶的地址 region: 'oss-cn-shenzhen', diff --git a/pages/login/index.vue b/pages/login/index.vue index abc5ce6..e9f0514 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -12,8 +12,11 @@ 头像 - @@ -65,6 +68,7 @@ this.nameUser = event.target.value }, onChooseAvatar(res) { + console.log(res); let self = this self.$Oss.ossUpload(res.target.avatarUrl).then(url => { self.imagUrl = url diff --git a/pages/user/index.vue b/pages/user/index.vue index e355e64..b59b0ff 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -1,8 +1,9 @@