From 7267cf93c90c19f649fd1bc1ffc803b824a421db Mon Sep 17 00:00:00 2001 From: ctw Date: Thu, 27 Nov 2025 18:45:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=BF=E6=8D=A2=E5=90=84=E4=B8=AA?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=EF=BC=9B?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C=E5=90=88=E5=B9=B6=EF=BC=9B?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=8A=A8=E6=80=81=E6=B7=BB=E5=8A=A0=E8=A7=86?= =?UTF-8?q?=E9=A2=91=EF=BC=9B=E5=88=86=E6=AE=B5=E6=8E=A7=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 23 ++-- src/common/request.js | 1 + src/components/file-upload/file-upload.vue | 2 - src/components/friend-item/friend-item.vue | 8 +- .../long-press-menu/long-press-menu.vue | 2 +- src/im-var.scss | 5 +- src/pages/home/city.vue | 61 ++++++--- src/pages/home/home.vue | 37 ++++-- src/pages/login/login.vue | 104 +++++++-------- src/pages/message/chat-box.vue | 2 +- src/pages/message/friend.vue | 8 +- src/pages/message/message.vue | 2 +- src/pages/moments/moments.vue | 40 +++++- src/pages/moments/publish.vue | 123 +++++++++++------- src/sheep/api/member/auth.js | 4 +- src/sheep/api/member/recent.ts | 20 +++ .../components/scroll-list/scroll-list.vue | 12 +- src/sheep/components/segmented/segmented.vue | 16 +-- src/sheep/request/index.js | 1 + src/sheep/store/app.js | 4 +- src/static/online_app.png | Bin 0 -> 2774 bytes src/static/online_web.png | Bin 0 -> 3467 bytes 22 files changed, 288 insertions(+), 187 deletions(-) create mode 100644 src/static/online_app.png create mode 100644 src/static/online_web.png diff --git a/src/App.vue b/src/App.vue index e12c05c4..1126b19a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -328,7 +328,7 @@ const groupId = msg.groupId; uni.navigateTo({ url: `/pages/chat/chat-group-video?groupId=${groupId}&isHost=false - &inviterId=${inviterId}&userInfos=${userInfos}`, + &inviterId=${inviterId}&userInfos=${userInfos}`, }); delayTime = 500; } @@ -388,7 +388,7 @@ return group; }, exit() { - console.log('exit'); + console.log('1exit'); this.isExit = true; wsApi.close(3099); uni.removeStorageSync('loginInfo'); @@ -494,28 +494,25 @@ ShoproInit(); // app启动时更新用户位置 uni.getLocation({ + geocode: true, success: (res) => { const params = { - issueLat: String(res.latitude), - issueLong: String(res.longitude), + lat: String(res.latitude), + lon: String(res.longitude), + province: res.address?.province ?? '', + city: res.address?.city ?? '', + district: res.address?.district ?? '', + address: res.address?.street ?? '', }; RecentApi.updateUserLocation(params); }, fail: (err) => { - uni.showToast({ title: '位置信息获取失败', icon: 'none' }); + uni.showToast({ title: '位置信息获取失败,请打开系统定位', icon: 'none' }); }, }); this.$mountStore(); this.closeSplashscreen(1000); // 延迟1s,避免用户看到页面跳转 - uni.setStorageSync('loginInfo', { - accessToken: - 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyIiwiZXhwIjoxNzY0MTQ1MDQyLCJpbmZvIjoie1wibmlja05hbWVcIjpcInd3d1wiLFwidGVybWluYWxcIjoxLFwidXNlcklkXCI6MixcInVzZXJOYW1lXCI6XCJ3d3dcIn0ifQ.yO8o-DM4mied_C5PFzqentfiETV38jmVjFzLVljouz4', - accessTokenExpiresIn: 1800, - refreshToken: - 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyIiwiZXhwIjoxNzY0NzQ4MDQyLCJpbmZvIjoie1wibmlja05hbWVcIjpcInd3d1wiLFwidGVybWluYWxcIjoxLFwidXNlcklkXCI6MixcInVzZXJOYW1lXCI6XCJ3d3dcIn0ifQ.O2Ge2P-n3JSjEqr7P5sH5jaSWZosopHycsuS-vk-WEU', - refreshTokenExpiresIn: 604800, - }); // 登录状态校验 let loginInfo = uni.getStorageSync('loginInfo'); this.refreshToken(loginInfo) diff --git a/src/common/request.js b/src/common/request.js index 38c41d86..390d96b2 100644 --- a/src/common/request.js +++ b/src/common/request.js @@ -22,6 +22,7 @@ const request = (options) => { if (res.data.code == 200) { return resolve(res.data.data); } else if (res.data.code == 400) { + console.log('code 400'); getApp().$vm.exit(); } else if (res.data.code == 401) { console.log('token失效,尝试重新获取'); diff --git a/src/components/file-upload/file-upload.vue b/src/components/file-upload/file-upload.vue index c10852c8..3a5b4205 100644 --- a/src/components/file-upload/file-upload.vue +++ b/src/components/file-upload/file-upload.vue @@ -126,5 +126,3 @@ }, }; - - diff --git a/src/components/friend-item/friend-item.vue b/src/components/friend-item/friend-item.vue index 47abad9a..d9583684 100644 --- a/src/components/friend-item/friend-item.vue +++ b/src/components/friend-item/friend-item.vue @@ -12,13 +12,13 @@ @@ -88,8 +88,8 @@ .online { padding-right: 4rpx; - width: 24rpx; - height: 24rpx; + width: 48rpx; + height: 48rpx; } } } diff --git a/src/components/long-press-menu/long-press-menu.vue b/src/components/long-press-menu/long-press-menu.vue index a86eca84..075c1885 100644 --- a/src/components/long-press-menu/long-press-menu.vue +++ b/src/components/long-press-menu/long-press-menu.vue @@ -119,7 +119,7 @@ position: fixed; border-radius: 4px; overflow: hidden; - background-color: $im-bg-active; + background-color: $im-bg-active-lighter; z-index: 1000; box-shadow: $im-box-shadow-dark; diff --git a/src/im-var.scss b/src/im-var.scss index 7363fb59..6d337aaf 100644 --- a/src/im-var.scss +++ b/src/im-var.scss @@ -46,8 +46,8 @@ $im-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1); $im-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.12); $im-box-shadow-dark: 0px 1px 10px 2px rgba( - $color: #444, - $alpha: 0.01, + $color: #666, + $alpha: 0.05, ); // 背景 @@ -55,6 +55,7 @@ $im-bg: #222; $im-bg-linear: linear-gradient(135deg, #222 0%, #333 100%); $im-bg-active: #333; $im-bg-active-light: #444; +$im-bg-active-lighter: #555; $im-bg-input: #333; // 标题 diff --git a/src/pages/home/city.vue b/src/pages/home/city.vue index 873fa2ec..dcb5be24 100644 --- a/src/pages/home/city.vue +++ b/src/pages/home/city.vue @@ -1,5 +1,5 @@